diff options
Diffstat (limited to 'internal/gitaly/service/namespace')
-rw-r--r-- | internal/gitaly/service/namespace/server.go | 5 | ||||
-rw-r--r-- | internal/gitaly/service/namespace/testhelper_test.go | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/internal/gitaly/service/namespace/server.go b/internal/gitaly/service/namespace/server.go index b0c31d6e6..1c2a2df68 100644 --- a/internal/gitaly/service/namespace/server.go +++ b/internal/gitaly/service/namespace/server.go @@ -1,6 +1,7 @@ package namespace import ( + "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/service" "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage" "gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypb" ) @@ -11,6 +12,6 @@ type server struct { } // NewServer creates a new instance of a gRPC namespace server -func NewServer(locator storage.Locator) gitalypb.NamespaceServiceServer { - return &server{locator: locator} +func NewServer(deps *service.Dependencies) gitalypb.NamespaceServiceServer { + return &server{locator: deps.GetLocator()} } diff --git a/internal/gitaly/service/namespace/testhelper_test.go b/internal/gitaly/service/namespace/testhelper_test.go index 2d8bd9bb4..79b1a5a8d 100644 --- a/internal/gitaly/service/namespace/testhelper_test.go +++ b/internal/gitaly/service/namespace/testhelper_test.go @@ -23,7 +23,7 @@ func setupNamespaceService(tb testing.TB, opts ...testserver.GitalyServerOpt) (c cfg := cfgBuilder.Build(tb) addr := testserver.RunGitalyServer(tb, cfg, func(srv *grpc.Server, deps *service.Dependencies) { - gitalypb.RegisterNamespaceServiceServer(srv, NewServer(deps.GetLocator())) + gitalypb.RegisterNamespaceServiceServer(srv, NewServer(deps)) }, opts...) conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) |