diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-04-21 16:57:34 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-04-21 16:57:34 +0300 |
commit | 3ff8154b9555e501556f1e0668cb304932008154 (patch) | |
tree | 97c30d968307a5aaae1cb252ce78d9f17e3caeb1 /internal/gitaly/service/repository/fetch_test.go | |
parent | e30fb605f6c3bbbd42068b2cb2d53eb312f2d00f (diff) |
Change gittest.CreateCommit to use provided configuration
The function gittest.CreateCommit changed to accept
configuration as an input parameter and now uses
Exec and ExecStream functions internally to run git commands.
All dependencies aligned on that change.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2699
Diffstat (limited to 'internal/gitaly/service/repository/fetch_test.go')
-rw-r--r-- | internal/gitaly/service/repository/fetch_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/service/repository/fetch_test.go b/internal/gitaly/service/repository/fetch_test.go index a7160a0db..2f7e45abf 100644 --- a/internal/gitaly/service/repository/fetch_test.go +++ b/internal/gitaly/service/repository/fetch_test.go @@ -49,7 +49,7 @@ func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { defer cleanup() sourceBranch := "fetch-source-branch-test-branch" - newCommitID := gittest.CreateCommit(t, sourcePath, sourceBranch, nil) + newCommitID := gittest.CreateCommit(t, config.Config, sourcePath, sourceBranch, nil) targetRef := "refs/tmp/fetch-source-branch-test" req := &gitalypb.FetchSourceBranchRequest{ @@ -87,7 +87,7 @@ func TestFetchSourceBranchSameRepositorySuccess(t *testing.T) { repo := localrepo.New(git.NewExecCommandFactory(config.Config), repoProto, config.Config) sourceBranch := "fetch-source-branch-test-branch" - newCommitID := gittest.CreateCommit(t, repoPath, sourceBranch, nil) + newCommitID := gittest.CreateCommit(t, config.Config, repoPath, sourceBranch, nil) targetRef := "refs/tmp/fetch-source-branch-test" req := &gitalypb.FetchSourceBranchRequest{ @@ -183,7 +183,7 @@ func TestFetchSourceBranchWrongRef(t *testing.T) { defer cleanup() sourceBranch := "fetch-source-branch-testmas-branch" - gittest.CreateCommit(t, sourceRepoPath, sourceBranch, nil) + gittest.CreateCommit(t, config.Config, sourceRepoPath, sourceBranch, nil) targetRef := "refs/tmp/fetch-source-branch-test" |