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
path: root/cmd
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-03 11:04:39 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-03 11:15:11 +0300
commit716320b5695f6068e5d9cf13812b8bc961d4bed1 (patch)
tree32436863ad2122167c06c79cd77f6b735d088ef4 /cmd
parent7be1d314a12e43bc79466754ca862ef0d3bd9549 (diff)
tests: Add missing tests for atomic repo creation feature flag
Some tests use CreateRepository et al, but don't verify that they still work with the corresponding feature flag which enables atomic repository creation. Some don't care but will start to fail when tests are required to explicitly inject all feature flags which are used, and others do care but weren't addressed. Add missing feature flags as required to prepare for explicitly required feature flags.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/praefect/subcmd_track_repository_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/praefect/subcmd_track_repository_test.go b/cmd/praefect/subcmd_track_repository_test.go
index 5b4d19264..b0cc9e673 100644
--- a/cmd/praefect/subcmd_track_repository_test.go
+++ b/cmd/praefect/subcmd_track_repository_test.go
@@ -11,6 +11,7 @@ import (
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v14/client"
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/service/setup"
+ "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v14/internal/praefect/config"
"gitlab.com/gitlab-org/gitaly/v14/internal/praefect/datastore"
"gitlab.com/gitlab-org/gitaly/v14/internal/praefect/datastore/glsql"
@@ -105,8 +106,10 @@ func TestAddRepository_Exec(t *testing.T) {
gitalyCC, err := client.Dial(g1Addr, nil)
require.NoError(t, err)
defer func() { require.NoError(t, gitalyCC.Close()) }()
+
ctx, cancel := testhelper.Context()
defer cancel()
+ ctx = featureflag.OutgoingCtxWithFeatureFlagValue(ctx, featureflag.TxAtomicRepositoryCreation, "true")
gitaly1RepositoryClient := gitalypb.NewRepositoryServiceClient(gitalyCC)