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-02-12 18:04:00 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-02-12 18:04:00 +0300
commitef4fb579a78bf9da22bcb8be399df848c14bd670 (patch)
treea4f114d4eab5ab2b2e2198b64273acd5aba4df7e /internal/gitaly/service/repository/fetch_test.go
parent75c835cb03c95a470becd8bd28cb0013249d407a (diff)
DI git.CommandFactory into localrepo.Repo
Current implementation of the localrepo.Repo creates *git.ExecCommandFactory internally and use it for running git commands. This dependency needs to be provided from the outside instead. The git.CommandFactory parameter added to the constructor func and all its usages fixed thor out the code.
Diffstat (limited to 'internal/gitaly/service/repository/fetch_test.go')
-rw-r--r--internal/gitaly/service/repository/fetch_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gitaly/service/repository/fetch_test.go b/internal/gitaly/service/repository/fetch_test.go
index 60c1f0783..731cab886 100644
--- a/internal/gitaly/service/repository/fetch_test.go
+++ b/internal/gitaly/service/repository/fetch_test.go
@@ -40,7 +40,7 @@ func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) {
targetRepoProto, _, cleanup := newTestRepo(t, locator, "fetch-source-target.git")
defer cleanup()
- targetRepo := localrepo.New(targetRepoProto, config.Config)
+ targetRepo := localrepo.New(git.NewExecCommandFactory(config.Config), targetRepoProto, config.Config)
sourceRepo, sourcePath, cleanup := newTestRepo(t, locator, "fetch-source-source.git")
defer cleanup()
@@ -82,7 +82,7 @@ func TestFetchSourceBranchSameRepositorySuccess(t *testing.T) {
repoProto, repoPath, cleanup := newTestRepo(t, locator, "fetch-source-source.git")
defer cleanup()
- repo := localrepo.New(repoProto, config.Config)
+ repo := localrepo.New(git.NewExecCommandFactory(config.Config), repoProto, config.Config)
sourceBranch := "fetch-source-branch-test-branch"
newCommitID := testhelper.CreateCommit(t, repoPath, sourceBranch, nil)