Skip to content

Commit

Permalink
[v14] Fix various Unimplemented{Service}Server pointer embeds (#44749)
Browse files Browse the repository at this point in the history
* Fix various Unimplemented{Service}Server pointer embeds

* Catch a few stragglers
  • Loading branch information
codingllama authored Jul 29, 2024
1 parent ce4e9e8 commit 22631ef
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions api/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestMain(m *testing.M) {
}

type pingService struct {
*proto.UnimplementedAuthServiceServer
proto.UnimplementedAuthServiceServer
userAgentFromLastCallValue atomic.Value
}

Expand Down Expand Up @@ -196,7 +196,7 @@ func TestWaitForConnectionReady(t *testing.T) {
}

type listResourcesService struct {
*proto.UnimplementedAuthServiceServer
proto.UnimplementedAuthServiceServer
}

func (s *listResourcesService) ListResources(ctx context.Context, req *proto.ListResourcesRequest) (*proto.ListResourcesResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/client/joinservice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

type mockJoinServiceServer struct {
*proto.UnimplementedJoinServiceServer
proto.UnimplementedJoinServiceServer
registerUsingTPMMethod func(srv proto.JoinService_RegisterUsingTPMMethodServer) error
}

Expand Down
2 changes: 1 addition & 1 deletion api/client/mfa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
)

type mfaService struct {
*proto.UnimplementedAuthServiceServer
proto.UnimplementedAuthServiceServer
}

func (s *mfaService) Ping(ctx context.Context, req *proto.PingRequest) (*proto.PingResponse, error) {
Expand Down
7 changes: 3 additions & 4 deletions api/client/proxy/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,15 @@ type fakeGRPCServer struct {
}

type fakeAuthServer struct {
*proto.UnimplementedAuthServiceServer
proto.UnimplementedAuthServiceServer
listener net.Listener
srv *grpc.Server
}

func newFakeAuthServer(t *testing.T, conn net.Conn) *fakeAuthServer {
f := &fakeAuthServer{
listener: newOneShotListener(conn),
UnimplementedAuthServiceServer: &proto.UnimplementedAuthServiceServer{},
srv: grpc.NewServer(),
listener: newOneShotListener(conn),
srv: grpc.NewServer(),
}

t.Cleanup(f.Stop)
Expand Down
2 changes: 1 addition & 1 deletion integration/proxy/teleterm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func testGatewayCertRenewal(t *testing.T, inst *helpers.TeleInstance, username,
}

type mockTSHDEventsService struct {
*api.UnimplementedTshdEventsServiceServer
api.UnimplementedTshdEventsServiceServer

tc *libclient.TeleportClient
inst *helpers.TeleInstance
Expand Down
2 changes: 1 addition & 1 deletion integration/teleterm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ func mustLogin(t *testing.T, userName string, pack *dbhelpers.DatabasePack, cred
}

type mockTSHDEventsService struct {
*api.UnimplementedTshdEventsServiceServer
api.UnimplementedTshdEventsServiceServer
sendPendingHeadlessAuthenticationCount atomic.Uint32
}

Expand Down
2 changes: 1 addition & 1 deletion lib/joinserver/joinserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type joinServiceClient interface {
// server. On the Auth Server, this is passed to auth.ServerWithRoles and
// through to auth.Server to be handled.
type JoinServiceGRPCServer struct {
*proto.UnimplementedJoinServiceServer
proto.UnimplementedJoinServiceServer

joinServiceClient joinServiceClient
clock clockwork.Clock
Expand Down
2 changes: 1 addition & 1 deletion lib/teleterm/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ func TestImportantModalSemaphore(t *testing.T) {
}

type mockTSHDEventsService struct {
*api.UnimplementedTshdEventsServiceServer
api.UnimplementedTshdEventsServiceServer
reloginErr error
reloginCount atomic.Uint32
sendNotificationCount atomic.Uint32
Expand Down

0 comments on commit 22631ef

Please sign in to comment.