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/remote/find_remote_root_ref_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/remote/find_remote_root_ref_test.go')
-rw-r--r-- | internal/gitaly/service/remote/find_remote_root_ref_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gitaly/service/remote/find_remote_root_ref_test.go b/internal/gitaly/service/remote/find_remote_root_ref_test.go index c30fccb53..e9bd8aec2 100644 --- a/internal/gitaly/service/remote/find_remote_root_ref_test.go +++ b/internal/gitaly/service/remote/find_remote_root_ref_test.go @@ -58,7 +58,7 @@ func TestFindRemoteRootRefWithUnbornRemoteHead(t *testing.T) { // We're creating an empty repository. Empty repositories do have a HEAD set up, but they // point to an unborn branch because the default branch hasn't yet been created. - _, clientRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg.Storages[0]) + _, clientRepoPath, cleanup := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0]) defer cleanup() testhelper.MustRunCommand(t, nil, "git", "-C", remoteRepoPath, "remote", "add", "foo", "file://"+clientRepoPath) |