diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2020-11-25 20:41:20 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2020-12-02 18:40:29 +0300 |
commit | 346bda13b1ffb68927557f9f1f21bbab89605c7b (patch) | |
tree | 0c90f4af29a66fa466212c2100698482562a4d12 /internal/praefect/server_factory_test.go | |
parent | b24283b141c8a25b14b312fbb7413842b7bd2a3f (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.go | 2 |
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) |