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:
authorVasilii Iakliushin <viakliushin@gitlab.com>2021-10-08 14:39:02 +0300
committerToon Claes <toon@gitlab.com>2021-10-11 16:10:00 +0300
commitf6c157ab1e9c086aa003b67db0bc53c7dd00e20c (patch)
tree9119e5fbb8816926ec4c1bf202abb8d45e1ca751
parent613320af12f05f508f9d139ad4d89ac229ea959d (diff)
Provide feature flag to TestFindLocalBranches* tests
-rw-r--r--internal/gitaly/service/ref/refs_test.go26
1 files changed, 18 insertions, 8 deletions
diff --git a/internal/gitaly/service/ref/refs_test.go b/internal/gitaly/service/ref/refs_test.go
index bf38a2d6d..7a5db2ad3 100644
--- a/internal/gitaly/service/ref/refs_test.go
+++ b/internal/gitaly/service/ref/refs_test.go
@@ -355,6 +355,12 @@ func TestSuccessfulFindLocalBranches(t *testing.T) {
}
func TestFindLocalBranches_huge_committer(t *testing.T) {
+ testhelper.NewFeatureSets([]featureflag.FeatureFlag{
+ featureflag.ExactPaginationTokenMatch,
+ }).Run(t, testFindLocalBranchesHugeCommitter)
+}
+
+func testFindLocalBranchesHugeCommitter(t *testing.T, ctx context.Context) {
cfg, repo, repoPath, client := setupRefService(t)
gittest.WriteCommit(t, cfg, repoPath,
@@ -364,9 +370,6 @@ func TestFindLocalBranches_huge_committer(t *testing.T) {
rpcRequest := &gitalypb.FindLocalBranchesRequest{Repository: repo}
- ctx, cancel := testhelper.Context()
- defer cancel()
-
c, err := client.FindLocalBranches(ctx, rpcRequest)
require.NoError(t, err)
@@ -380,10 +383,13 @@ func TestFindLocalBranches_huge_committer(t *testing.T) {
}
func TestFindLocalBranchesPagination(t *testing.T) {
- _, repo, _, client := setupRefService(t)
+ testhelper.NewFeatureSets([]featureflag.FeatureFlag{
+ featureflag.ExactPaginationTokenMatch,
+ }).Run(t, testFindLocalBranchesPagination)
+}
- ctx, cancel := testhelper.Context()
- defer cancel()
+func testFindLocalBranchesPagination(t *testing.T, ctx context.Context) {
+ _, repo, _, client := setupRefService(t)
limit := 1
rpcRequest := &gitalypb.FindLocalBranchesRequest{
@@ -509,6 +515,12 @@ func isOrderedSubset(subset, set []string) bool {
}
func TestFindLocalBranchesSort(t *testing.T) {
+ testhelper.NewFeatureSets([]featureflag.FeatureFlag{
+ featureflag.ExactPaginationTokenMatch,
+ }).Run(t, testFindLocalBranchesSort)
+}
+
+func testFindLocalBranchesSort(t *testing.T, ctx context.Context) {
testCases := []struct {
desc string
relativeOrder []string
@@ -537,8 +549,6 @@ func TestFindLocalBranchesSort(t *testing.T) {
t.Run(testCase.desc, func(t *testing.T) {
rpcRequest := &gitalypb.FindLocalBranchesRequest{Repository: repo, SortBy: testCase.sortBy}
- ctx, cancel := testhelper.Context()
- defer cancel()
c, err := client.FindLocalBranches(ctx, rpcRequest)
require.NoError(t, err)