From 346bda13b1ffb68927557f9f1f21bbab89605c7b Mon Sep 17 00:00:00 2001 From: Sami Hiltunen Date: Wed, 25 Nov 2020 18:41:20 +0100 Subject: 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. --- internal/praefect/server_factory_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/praefect/server_factory_test.go') 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) -- cgit v1.2.3