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/git/gittest/repository_suite.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/git/gittest/repository_suite.go')
-rw-r--r-- | internal/git/gittest/repository_suite.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git/gittest/repository_suite.go b/internal/git/gittest/repository_suite.go index 8a14cac24..3c6bb0f8f 100644 --- a/internal/git/gittest/repository_suite.go +++ b/internal/git/gittest/repository_suite.go @@ -89,7 +89,7 @@ func testRepositoryHasBranches(t *testing.T, cfg config.Cfg, getRepository func( ctx, cancel := testhelper.Context() defer cancel() - pbRepo, repoPath, cleanup := InitBareRepoAt(t, cfg.Storages[0]) + pbRepo, repoPath, cleanup := InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() repo := getRepository(t, pbRepo) |