Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2021-04-27 19:53:27 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-04-29 22:13:52 +0300
commita4daa51dd6fe7e7cfb631c4379e88d71d70f2b67 (patch)
treecc520f3c968f7aa8789ea14147d916a910abf3d0 /internal/backup/backup_test.go
parentcf439642cae08dd4dab6a88bd026e8dedbff12d1 (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/backup/backup_test.go')
-rw-r--r--internal/backup/backup_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/backup/backup_test.go b/internal/backup/backup_test.go
index ce85f235f..0900da2a6 100644
--- a/internal/backup/backup_test.go
+++ b/internal/backup/backup_test.go
@@ -28,7 +28,7 @@ func TestFilesystem_BackupRepository(t *testing.T) {
require.NoError(t, ioutil.WriteFile(filepath.Join(hooksRepoPath, "custom_hooks/pre-commit.sample"), []byte("Some hooks"), os.ModePerm))
noHooksRepo, _, _ := gittest.CloneRepoAtStorage(t, cfg.Storages[0], "no-hooks")
- emptyRepo, _, _ := gittest.InitBareRepoAt(t, cfg.Storages[0])
+ emptyRepo, _, _ := gittest.InitBareRepoAt(t, cfg, cfg.Storages[0])
nonexistentRepo := *emptyRepo
nonexistentRepo.RelativePath = "nonexistent"