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:
authorSami Hiltunen <shiltunen@gitlab.com>2020-12-10 11:34:38 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2020-12-10 11:34:38 +0300
commit502c192c2125b1b85a60ba49f193067cb3b867e1 (patch)
tree087c76bbc88553e6912185d83f241e697e025669
parent4ced8bf422202d1dba6ec088259d7c64f2ba5455 (diff)
parentdffac3d73e348ef48a14d11a92d178cf99475366 (diff)
Merge branch 'ps-fix-usage-mock-repository-store' into 'master'
Fix usage of MockRepositoryStore in a test setup See merge request gitlab-org/gitaly!2904
-rw-r--r--internal/praefect/helper_test.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/praefect/helper_test.go b/internal/praefect/helper_test.go
index d469003c2..d3c78620f 100644
--- a/internal/praefect/helper_test.go
+++ b/internal/praefect/helper_test.go
@@ -221,12 +221,10 @@ func runPraefectServer(t testing.TB, conf config.Config, opt buildOptions) (*grp
opt.withNodeMgr = defaultNodeMgr(t, conf, opt.withRepoStore)
}
- rs := datastore.MockRepositoryStore{}
-
coordinator := NewCoordinator(
opt.withQueue,
- rs,
- NewNodeManagerRouter(opt.withNodeMgr, rs),
+ opt.withRepoStore,
+ NewNodeManagerRouter(opt.withNodeMgr, opt.withRepoStore),
opt.withTxMgr,
conf,
opt.withAnnotations,
@@ -237,12 +235,12 @@ func runPraefectServer(t testing.TB, conf config.Config, opt buildOptions) (*grp
opt.withLogger,
conf.VirtualStorageNames(),
opt.withQueue,
- rs,
+ opt.withRepoStore,
opt.withNodeMgr,
NodeSetFromNodeManager(opt.withNodeMgr),
)
- prf := NewGRPCServer(conf, opt.withLogger, protoregistry.GitalyProtoPreregistered, coordinator.StreamDirector, opt.withNodeMgr, opt.withTxMgr, opt.withQueue, rs, nil)
+ prf := NewGRPCServer(conf, opt.withLogger, protoregistry.GitalyProtoPreregistered, coordinator.StreamDirector, opt.withNodeMgr, opt.withTxMgr, opt.withQueue, opt.withRepoStore, nil)
listener, port := listenAvailPort(t)
t.Logf("proxy listening on port %d", port)