diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-10-24 14:19:16 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-10-31 15:18:32 +0300 |
commit | 1a46729b8560f5092c4b46de9a1ed7d8b3baec8e (patch) | |
tree | af3656f5b0774e99a37f4981507631fe3b134744 /internal/testhelper/testserver/gitaly.go | |
parent | d9990d37ed88507f9498d7472273c3e7d5c0da9e (diff) |
Inject database opener into PartitionManager
PartitionManager will soon gain a goroutine that runs garbage
collection on the Badger database. In order to test that change,
we need to be able to mock out badger in the test. This commit
injects a database opener into PartitionManager so we can mock out
the database in the tests.
Diffstat (limited to 'internal/testhelper/testserver/gitaly.go')
-rw-r--r-- | internal/testhelper/testserver/gitaly.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/testhelper/testserver/gitaly.go b/internal/testhelper/testserver/gitaly.go index ecb83999a..342551331 100644 --- a/internal/testhelper/testserver/gitaly.go +++ b/internal/testhelper/testserver/gitaly.go @@ -376,6 +376,7 @@ func (gsd *gitalyServerDeps) createDependencies(tb testing.TB, cfg config.Cfg) * gsd.housekeepingManager, localrepo.NewFactory(gsd.logger, gsd.locator, gsd.gitCmdFactory, gsd.catfileCache), gsd.logger, + storagemgr.DatabaseOpenerFunc(storagemgr.OpenDatabase), ) require.NoError(tb, err) tb.Cleanup(partitionManager.Close) |