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/git2go/commit_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/git2go/commit_test.go')
-rw-r--r-- | internal/git2go/commit_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git2go/commit_test.go b/internal/git2go/commit_test.go index 68916b759..26c8480fc 100644 --- a/internal/git2go/commit_test.go +++ b/internal/git2go/commit_test.go @@ -56,7 +56,7 @@ func TestExecutor_Commit(t *testing.T) { cfg := testcfg.Build(t) testhelper.ConfigureGitalyGit2GoBin(t, cfg) - repoProto, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + repoProto, repoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) t.Cleanup(cleanup) repo := localrepo.New(git.NewExecCommandFactory(cfg), repoProto, cfg) |