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/auth_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/auth_test.go')
-rw-r--r-- | internal/praefect/auth_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/praefect/auth_test.go b/internal/praefect/auth_test.go index ac73e07e3..0fceb176d 100644 --- a/internal/praefect/auth_test.go +++ b/internal/praefect/auth_test.go @@ -167,9 +167,8 @@ func runServer(t *testing.T, token string, required bool) (*grpc.Server, string, logEntry := testhelper.DiscardTestEntry(t) queue := datastore.NewMemoryReplicationEventQueue(conf) - rs := datastore.NewMemoryRepositoryStore(conf.StorageNames()) - nodeMgr, err := nodes.NewManager(logEntry, conf, nil, rs, nil, promtest.NewMockHistogramVec(), protoregistry.GitalyProtoPreregistered, nil) + nodeMgr, err := nodes.NewManager(logEntry, conf, nil, nil, nil, promtest.NewMockHistogramVec(), protoregistry.GitalyProtoPreregistered, nil) require.NoError(t, err) txMgr := transactions.NewManager(conf) @@ -177,9 +176,9 @@ func runServer(t *testing.T, token string, required bool) (*grpc.Server, string, registry, err := protoregistry.New(fd) require.NoError(t, err) - coordinator := NewCoordinator(queue, rs, NewNodeManagerRouter(nodeMgr, rs), txMgr, conf, registry) + coordinator := NewCoordinator(queue, nil, NewNodeManagerRouter(nodeMgr, nil), txMgr, conf, registry) - srv := NewGRPCServer(conf, logEntry, registry, coordinator.StreamDirector, nodeMgr, txMgr, queue, rs) + srv := NewGRPCServer(conf, logEntry, registry, coordinator.StreamDirector, nodeMgr, txMgr, queue, nil) serverSocketPath := testhelper.GetTemporaryGitalySocketFileName() |