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:
authorKarthik Nayak <knayak@gitlab.com>2022-08-26 11:18:33 +0300
committerKarthik Nayak <knayak@gitlab.com>2022-08-26 12:38:09 +0300
commitfcf5889846c2260697e5507df8428fbbf4d4ebd8 (patch)
tree0efe2c0d8b5523d55658c9e2534cecf55679a59d
parent2f05fe7dc3ae746ebbc539ecf02be79f5e0965ef (diff)
testhelper: Rename 'assertContainsBranch'
Rename the function 'assertContainsAllBranchesResponseBranch' and its usecases because its name is not generic enough and we want to introduce a more generic 'assertContainsBranch' commit in the following commits.
-rw-r--r--internal/gitaly/service/ref/refs_test.go6
-rw-r--r--internal/gitaly/service/ref/testhelper_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/gitaly/service/ref/refs_test.go b/internal/gitaly/service/ref/refs_test.go
index 5e5101dcb..02d1163bd 100644
--- a/internal/gitaly/service/ref/refs_test.go
+++ b/internal/gitaly/service/ref/refs_test.go
@@ -569,11 +569,11 @@ func TestSuccessfulFindAllBranchesRequest(t *testing.T) {
Name: []byte(name),
Target: target,
}
- assertContainsBranch(t, branches, branch)
+ assertContainsAllBranchesResponseBranch(t, branches, branch)
}
// It contains our fake remote branch
- assertContainsBranch(t, branches, remoteBranch)
+ assertContainsAllBranchesResponseBranch(t, branches, remoteBranch)
}
func TestSuccessfulFindAllBranchesRequestWithMergedBranches(t *testing.T) {
@@ -656,7 +656,7 @@ func TestSuccessfulFindAllBranchesRequestWithMergedBranches(t *testing.T) {
continue
}
- assertContainsBranch(t, testCase.expectedBranches, branch)
+ assertContainsAllBranchesResponseBranch(t, testCase.expectedBranches, branch)
}
})
}
diff --git a/internal/gitaly/service/ref/testhelper_test.go b/internal/gitaly/service/ref/testhelper_test.go
index 0f94412dc..803ab1263 100644
--- a/internal/gitaly/service/ref/testhelper_test.go
+++ b/internal/gitaly/service/ref/testhelper_test.go
@@ -121,7 +121,7 @@ func findLocalBranchResponsesEqual(a *gitalypb.FindLocalBranchResponse, b *gital
findLocalBranchCommitAuthorsEqual(a.CommitCommitter, b.CommitCommitter)
}
-func assertContainsBranch(t *testing.T, branches []*gitalypb.FindAllBranchesResponse_Branch, branch *gitalypb.FindAllBranchesResponse_Branch) {
+func assertContainsAllBranchesResponseBranch(t *testing.T, branches []*gitalypb.FindAllBranchesResponse_Branch, branch *gitalypb.FindAllBranchesResponse_Branch) {
t.Helper()
var branchNames [][]byte