Skip to content

Commit

Permalink
Fix various Unimplemented{Service}Server pointer embeds (#44747)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingllama authored Jul 29, 2024
1 parent 9ed8d72 commit 7a1547e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions api/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestMain(m *testing.M) {
}

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

Expand Down Expand Up @@ -192,7 +192,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
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 @@ -297,7 +297,7 @@ func testGatewayCertRenewal(ctx context.Context, t *testing.T, params gatewayCer
}

type mockTSHDEventsService struct {
*api.UnimplementedTshdEventsServiceServer
api.UnimplementedTshdEventsServiceServer

t *testing.T
tc *libclient.TeleportClient
Expand Down
2 changes: 1 addition & 1 deletion lib/joinserver/joinserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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 @@ -580,7 +580,7 @@ func TestImportantModalSemaphore(t *testing.T) {
}

type mockTSHDEventsService struct {
*api.UnimplementedTshdEventsServiceServer
api.UnimplementedTshdEventsServiceServer
reloginErr error
reloginCount atomic.Uint32
sendNotificationCount atomic.Uint32
Expand Down
2 changes: 1 addition & 1 deletion lib/uds/cred_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestGetCreds(t *testing.T) {
}

type service struct {
*machineidv1.UnimplementedBotServiceServer
machineidv1.UnimplementedBotServiceServer
lastCalledCreds *Creds
}

Expand Down

0 comments on commit 7a1547e

Please sign in to comment.