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:
Diffstat (limited to 'internal/gitaly/service/repository/rename_test.go')
-rw-r--r--internal/gitaly/service/repository/rename_test.go26
1 files changed, 17 insertions, 9 deletions
diff --git a/internal/gitaly/service/repository/rename_test.go b/internal/gitaly/service/repository/rename_test.go
index 12e8383d1..d252345c4 100644
--- a/internal/gitaly/service/repository/rename_test.go
+++ b/internal/gitaly/service/repository/rename_test.go
@@ -3,6 +3,7 @@
package repository
import (
+ "context"
"fmt"
"os"
"path/filepath"
@@ -13,6 +14,7 @@ import (
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/storage"
+ "gitlab.com/gitlab-org/gitaly/v15/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testserver"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
@@ -20,10 +22,12 @@ import (
"google.golang.org/grpc/status"
)
-func TestRenameRepositorySuccess(t *testing.T) {
- t.Parallel()
+func TestRenameRepository_success(t *testing.T) {
+ testhelper.NewFeatureSets(featureflag.PraefectGeneratedReplicaPaths).Run(t, testRenameRepositorySuccess)
+}
- ctx := testhelper.Context(t)
+func testRenameRepositorySuccess(t *testing.T, ctx context.Context) {
+ t.Parallel()
// Praefect does not move repositories on the disk so this test case is not run with Praefect.
cfg, repo, _, client := setupRepositoryService(t, ctx, testserver.WithDisablePraefect())
@@ -45,10 +49,12 @@ func TestRenameRepositorySuccess(t *testing.T) {
gittest.RequireObjectExists(t, cfg, newDirectory, git.ObjectID("913c66a37b4a45b9769037c55c2d238bd0942d2e"))
}
-func TestRenameRepositoryDestinationExists(t *testing.T) {
- t.Parallel()
+func TestRenameRepository_DestinationExists(t *testing.T) {
+ testhelper.NewFeatureSets(featureflag.PraefectGeneratedReplicaPaths).Run(t, testRenameRepositoryDestinationExists)
+}
- ctx := testhelper.Context(t)
+func testRenameRepositoryDestinationExists(t *testing.T, ctx context.Context) {
+ t.Parallel()
cfg, client := setupRepositoryServiceWithoutRepo(t)
@@ -73,10 +79,12 @@ func TestRenameRepositoryDestinationExists(t *testing.T) {
gittest.RequireObjectExists(t, cfg, destinationRepoPath, commitID)
}
-func TestRenameRepositoryInvalidRequest(t *testing.T) {
- t.Parallel()
+func TestRenameRepository_invalidRequest(t *testing.T) {
+ testhelper.NewFeatureSets(featureflag.PraefectGeneratedReplicaPaths).Run(t, testRenameRepositoryInvalidRequest)
+}
- ctx := testhelper.Context(t)
+func testRenameRepositoryInvalidRequest(t *testing.T, ctx context.Context) {
+ t.Parallel()
_, repo, repoPath, client := setupRepositoryService(t, ctx)
storagePath := strings.TrimSuffix(repoPath, "/"+repo.RelativePath)