Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-18 11:36:35 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-19 09:44:30 +0300
commit04d42dd6e30f0a1638445df9a3f2eb85e75171ee (patch)
tree294da5371c48341e0eeaad02a729d87b03d981d7 /internal/gitaly/service/namespace/testhelper_test.go
parentc0fae08db4a3d19a86d899ae94296e022ab0ac26 (diff)
service: Simplify injection of dependencies for Namespace server
While we already have a `service.Dependencies` type around for quite a long time, we still pass in dependencies explicitly when constructing the actual server. This makes it harder than necessary to make a server require more dependencies as you will have to adjust all callsites where the server is currently getting constructed. Simplify the code to instead inject the `service.Dependencies` type into the server directly. This will allow us to propagate dependencies more readily in the future.
Diffstat (limited to 'internal/gitaly/service/namespace/testhelper_test.go')
-rw-r--r--internal/gitaly/service/namespace/testhelper_test.go2
1 files changed, 1 insertions, 1 deletions
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()))