diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-04-27 19:53:27 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-04-29 22:13:52 +0300 |
commit | a4daa51dd6fe7e7cfb631c4379e88d71d70f2b67 (patch) | |
tree | cc520f3c968f7aa8789ea14147d916a910abf3d0 /internal/gitaly/service/repository/optimize_test.go | |
parent | cf439642cae08dd4dab6a88bd026e8dedbff12d1 (diff) |
Replace MustRunCommand with Exec in initRepoAt
Function initRepoAt used by InitBareRepoAt and
InitRepoWithWorktreeAtStorage to setup repositories
on the storage. By adding config.Cfg as an additional
parameter and replacing the MustRunCommand with Exec
we break dependency on the global config.Config variable.
The change also removes unused InitBareRepo and related
test for it.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2699
Diffstat (limited to 'internal/gitaly/service/repository/optimize_test.go')
-rw-r--r-- | internal/gitaly/service/repository/optimize_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gitaly/service/repository/optimize_test.go b/internal/gitaly/service/repository/optimize_test.go index 45f5933ca..5c1d22407 100644 --- a/internal/gitaly/service/repository/optimize_test.go +++ b/internal/gitaly/service/repository/optimize_test.go @@ -89,7 +89,7 @@ func TestOptimizeRepository(t *testing.T) { require.Equal(t, getNewestPackfileModtime(t, repoPath), newestsPackfileTime, "there should not have been a new packfile created") - testRepo, testRepoPath, cleanupBare := gittest.InitBareRepoAt(t, cfg.Storages[0]) + testRepo, testRepoPath, cleanupBare := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanupBare) blobs := 10 |