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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-05-03 15:27:57 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-05-03 16:51:20 +0300
commit04e6c09a205772d7df6cdf914ce167e1b9604f84 (patch)
treeaadf832d93ee1eaef5fc11ee274f4cc5e4da5cff
parent5f18577d2a5cfd5ec0af5c6b8e59b75fce65e261 (diff)
commit: Convert trivial cases of tests needlessly using worktrees
Two tests in the `CommitService` code use worktrees without really needing them. Refactor them to not use worktrees.
-rw-r--r--internal/gitaly/service/commit/find_commit_test.go2
-rw-r--r--internal/gitaly/service/commit/find_commits_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/service/commit/find_commit_test.go b/internal/gitaly/service/commit/find_commit_test.go
index 54b2ad459..0df0846a2 100644
--- a/internal/gitaly/service/commit/find_commit_test.go
+++ b/internal/gitaly/service/commit/find_commit_test.go
@@ -294,7 +294,7 @@ func BenchmarkFindCommitWithCache(b *testing.B) {
func benchmarkFindCommit(withCache bool, b *testing.B) {
ctx := testhelper.Context(b)
- cfg, repo, _, client := setupCommitServiceWithRepo(ctx, b, false)
+ cfg, repo, _, client := setupCommitServiceWithRepo(ctx, b, true)
// get a list of revisions
gitCmdFactory := gittest.NewCommandFactory(b, cfg)
diff --git a/internal/gitaly/service/commit/find_commits_test.go b/internal/gitaly/service/commit/find_commits_test.go
index 0252e9c45..fc4083573 100644
--- a/internal/gitaly/service/commit/find_commits_test.go
+++ b/internal/gitaly/service/commit/find_commits_test.go
@@ -482,7 +482,7 @@ func TestSuccessfulFindCommitsRequestWithAmbiguousRef(t *testing.T) {
t.Parallel()
ctx := testhelper.Context(t)
- cfg, repo, repoPath, client := setupCommitServiceWithRepo(ctx, t, false)
+ cfg, repo, repoPath, client := setupCommitServiceWithRepo(ctx, t, true)
// These are arbitrary SHAs in the repository. The important part is
// that we create a branch using one of them with a different SHA so
@@ -490,7 +490,7 @@ func TestSuccessfulFindCommitsRequestWithAmbiguousRef(t *testing.T) {
branchName := "1e292f8fedd741b75372e19097c76d327140c312"
commitSha := "6907208d755b60ebeacb2e9dfea74c92c3449a1f"
- gittest.Exec(t, cfg, "-C", repoPath, "checkout", "-b", branchName, commitSha)
+ gittest.Exec(t, cfg, "-C", repoPath, "branch", branchName, commitSha)
request := &gitalypb.FindCommitsRequest{
Repository: repo,