diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2022-02-28 20:38:34 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2022-02-28 20:38:34 +0300 |
commit | 29e11b58a847bcf87055cea2f30afd7a9c2accb4 (patch) | |
tree | 9fcc05b872f04e29254379f1a35f5b195a2e8d76 /internal/gitaly/service | |
parent | d3caab41ad4b2d4044e063ac626478214c3cbc40 (diff) | |
parent | 03f9491ef621a35792cca219ee6cb075001dc07b (diff) |
Merge branch 'pks-ff-remove-fetch-internal-with-sidechannel' into 'master'
localrepo: Remove flag to switch to sidechannels for internal fetches
Closes #4065
See merge request gitlab-org/gitaly!4375
Diffstat (limited to 'internal/gitaly/service')
5 files changed, 6 insertions, 31 deletions
diff --git a/internal/gitaly/service/conflicts/resolve_conflicts_test.go b/internal/gitaly/service/conflicts/resolve_conflicts_test.go index 6c29067ac..0cc778069 100644 --- a/internal/gitaly/service/conflicts/resolve_conflicts_test.go +++ b/internal/gitaly/service/conflicts/resolve_conflicts_test.go @@ -18,7 +18,6 @@ import ( "gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest" "gitlab.com/gitlab-org/gitaly/v14/internal/git/localrepo" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/hook" - "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testcfg" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" @@ -200,10 +199,7 @@ func TestSuccessfulResolveConflictsRequestHelper(t *testing.T) { func TestResolveConflictsWithRemoteRepo(t *testing.T) { t.Parallel() - testhelper.NewFeatureSets(featureflag.FetchInternalWithSidechannel).Run(t, testResolveConflictsWithRemoteRepo) -} - -func testResolveConflictsWithRemoteRepo(t *testing.T, ctx context.Context) { + ctx := testhelper.Context(t) hookManager := hook.NewMockManager(t, hook.NopPreReceive, hook.NopPostReceive, hook.NopUpdate, hook.NopReferenceTransaction) cfg, sourceRepo, sourceRepoPath, client := SetupConflictsService(ctx, t, true, hookManager) @@ -817,10 +813,9 @@ func TestFailedResolveConflictsRequestDueToValidation(t *testing.T) { } func TestResolveConflictsQuarantine(t *testing.T) { - testhelper.NewFeatureSets(featureflag.FetchInternalWithSidechannel).Run(t, testResolveConflictsQuarantine) -} + t.Parallel() -func testResolveConflictsQuarantine(t *testing.T, ctx context.Context) { + ctx := testhelper.Context(t) cfg, sourceRepoProto, sourceRepoPath, client := SetupConflictsService(ctx, t, true, nil) testcfg.BuildGitalySSH(t, cfg) diff --git a/internal/gitaly/service/operations/rebase_test.go b/internal/gitaly/service/operations/rebase_test.go index 901db8214..1d388ded7 100644 --- a/internal/gitaly/service/operations/rebase_test.go +++ b/internal/gitaly/service/operations/rebase_test.go @@ -1,7 +1,6 @@ package operations import ( - "context" "fmt" "io" "path/filepath" @@ -16,7 +15,6 @@ import ( "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/transaction" "gitlab.com/gitlab-org/gitaly/v14/internal/metadata" - "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testserver" "gitlab.com/gitlab-org/gitaly/v14/internal/transaction/txinfo" @@ -656,10 +654,8 @@ func TestRebaseRequestWithDeletedFile(t *testing.T) { func TestRebaseOntoRemoteBranch(t *testing.T) { t.Parallel() - testhelper.NewFeatureSets(featureflag.FetchInternalWithSidechannel).Run(t, testRebaseOntoRemoteBranch) -} -func testRebaseOntoRemoteBranch(t *testing.T, ctx context.Context) { + ctx := testhelper.Context(t) ctx, cfg, repoProto, repoPath, client := setupOperationsService(t, ctx) repo := localrepo.NewTestRepo(t, cfg, repoProto) diff --git a/internal/gitaly/service/operations/revert_test.go b/internal/gitaly/service/operations/revert_test.go index 27a6cda0d..22e10efa2 100644 --- a/internal/gitaly/service/operations/revert_test.go +++ b/internal/gitaly/service/operations/revert_test.go @@ -1,7 +1,6 @@ package operations import ( - "context" "fmt" "path/filepath" "testing" @@ -11,7 +10,6 @@ import ( "gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest" "gitlab.com/gitlab-org/gitaly/v14/internal/git/localrepo" "gitlab.com/gitlab-org/gitaly/v14/internal/helper/text" - "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" "google.golang.org/grpc/codes" @@ -275,10 +273,7 @@ func TestServer_UserRevert_stableID(t *testing.T) { func TestServer_UserRevert_successfulIntoEmptyRepo(t *testing.T) { t.Parallel() - testhelper.NewFeatureSets(featureflag.FetchInternalWithSidechannel).Run(t, testServerUserRevertSuccessfulIntoEmptyRepo) -} - -func testServerUserRevertSuccessfulIntoEmptyRepo(t *testing.T, ctx context.Context) { + ctx := testhelper.Context(t) ctx, cfg, startRepoProto, _, client := setupOperationsService(t, ctx) startRepo := localrepo.NewTestRepo(t, cfg, startRepoProto) diff --git a/internal/gitaly/service/repository/fetch_test.go b/internal/gitaly/service/repository/fetch_test.go index 30c7b14af..360ced75d 100644 --- a/internal/gitaly/service/repository/fetch_test.go +++ b/internal/gitaly/service/repository/fetch_test.go @@ -1,14 +1,12 @@ package repository import ( - "context" "testing" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/v14/internal/git" "gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest" "gitlab.com/gitlab-org/gitaly/v14/internal/git/localrepo" - "gitlab.com/gitlab-org/gitaly/v14/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testcfg" "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb" @@ -18,10 +16,7 @@ import ( func TestFetchSourceBranchSourceRepositorySuccess(t *testing.T) { t.Parallel() - testhelper.NewFeatureSets(featureflag.FetchInternalWithSidechannel).Run(t, testFetchSourceBranchSourceRepositorySuccess) -} - -func testFetchSourceBranchSourceRepositorySuccess(t *testing.T, ctx context.Context) { + ctx := testhelper.Context(t) cfg, sourceRepo, sourcePath, client := setupRepositoryService(ctx, t) md := testcfg.GitalyServersMetadataFromCfg(t, cfg) diff --git a/internal/gitaly/service/repository/replicate_test.go b/internal/gitaly/service/repository/replicate_test.go index 7c2231aea..7b87f8923 100644 --- a/internal/gitaly/service/repository/replicate_test.go +++ b/internal/gitaly/service/repository/replicate_test.go @@ -43,7 +43,6 @@ import ( func TestReplicateRepository(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testReplicateRepository) } @@ -121,7 +120,6 @@ func testReplicateRepository(t *testing.T, ctx context.Context) { func TestReplicateRepositoryTransactional(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testReplicateRepositoryTransactional) } @@ -307,7 +305,6 @@ func TestReplicateRepositoryInvalidArguments(t *testing.T) { func TestReplicateRepository_BadRepository(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testReplicateRepositoryBadRepository) } @@ -395,7 +392,6 @@ func testReplicateRepositoryBadRepository(t *testing.T, ctx context.Context) { func TestReplicateRepository_FailedFetchInternalRemote(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testReplicateRepositoryFailedFetchInternalRemote) } @@ -481,7 +477,6 @@ func listenGitalySSHCalls(t *testing.T, conf config.Cfg) func() gitalySSHParams func TestFetchInternalRemote_successful(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testFetchInternalRemoteSuccessful) } @@ -573,7 +568,6 @@ func testFetchInternalRemoteSuccessful(t *testing.T, ctx context.Context) { func TestFetchInternalRemote_failure(t *testing.T) { t.Parallel() testhelper.NewFeatureSets( - featureflag.FetchInternalWithSidechannel, featureflag.TransactionalSymbolicRefUpdates, ).Run(t, testFetchInternalRemoteFailure) } |