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:
authorJohn Cai <jcai@gitlab.com>2023-04-03 19:03:11 +0300
committerJohn Cai <jcai@gitlab.com>2023-05-31 21:08:05 +0300
commit7f7d34a9c0617be84ae9422b0caa1dffc30ca3e5 (patch)
treee7b69b946c22aa450a61cf182e257e3b7b1a3291 /internal/gitaly/service/operations/submodules_test.go
parentc58368d3df3526338a20ddc877f5da71cf8a70b0 (diff)
operations: Replace UserUpdateSubmodule implementation with tree helpers
Now that we have helpers for modifying tree entries, replace our existing git plumbing implementation with the TreeEntry Modify() helper behind a feature flag.
Diffstat (limited to 'internal/gitaly/service/operations/submodules_test.go')
-rw-r--r--internal/gitaly/service/operations/submodules_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/gitaly/service/operations/submodules_test.go b/internal/gitaly/service/operations/submodules_test.go
index bb689e78f..9dbe897e7 100644
--- a/internal/gitaly/service/operations/submodules_test.go
+++ b/internal/gitaly/service/operations/submodules_test.go
@@ -4,11 +4,13 @@ package operations
import (
"bytes"
+ "context"
"fmt"
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/featureflag"
"gitlab.com/gitlab-org/gitaly/v16/internal/git"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo"
@@ -21,7 +23,11 @@ import (
func TestUserUpdateSubmodule(t *testing.T) {
t.Parallel()
- ctx := testhelper.Context(t)
+ testhelper.NewFeatureSets(featureflag.SubmoduleWithTreeAPI).
+ Run(t, testUserUpdateSubmodule)
+}
+
+func testUserUpdateSubmodule(t *testing.T, ctx context.Context) {
ctx, cfg, client := setupOperationsServiceWithoutRepo(t, ctx)
type setupData struct {