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-11-25 20:41:20 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2020-12-02 18:40:29 +0300
commit346bda13b1ffb68927557f9f1f21bbab89605c7b (patch)
tree0c90f4af29a66fa466212c2100698482562a4d12 /internal/praefect/server_factory_test.go
parentb24283b141c8a25b14b312fbb7413842b7bd2a3f (diff)
remove usage of MemoryRepositoryStore in tests
To prepare for removing the MemoryRepositoryStore, this commit removes its uses in tests. Mostly the tests need something that works, which is when DisableRepositoryStore is used. When a test is testing a particular scenario with the RepositoryStore, a mock is provided instead. Ideally we'd use the Postgres implementation in these cases but hooking it in requires some additional work as the test setup overwrites home directory which breaks the discovery of GDK's Postgres.
Diffstat (limited to 'internal/praefect/server_factory_test.go')
-rw-r--r--internal/praefect/server_factory_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/praefect/server_factory_test.go b/internal/praefect/server_factory_test.go
index b30075618..b0fb63e06 100644
--- a/internal/praefect/server_factory_test.go
+++ b/internal/praefect/server_factory_test.go
@@ -80,7 +80,7 @@ func TestServerFactory(t *testing.T) {
logger := testhelper.DiscardTestEntry(t)
queue := datastore.NewMemoryReplicationEventQueue(conf)
- rs := datastore.NewMemoryRepositoryStore(conf.StorageNames())
+ rs := datastore.MockRepositoryStore{}
sp := datastore.NewDirectStorageProvider(rs)
nodeMgr, err := nodes.NewManager(logger, conf, nil, rs, sp, &promtest.MockHistogramVec{}, protoregistry.GitalyProtoPreregistered, nil)
require.NoError(t, err)