diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2020-11-23 18:15:13 +0300 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2020-11-23 18:15:13 +0300 |
commit | 90d3a1d8586b0d7c96e7740bcd9f59be95032a37 (patch) | |
tree | 1915f3f7d8a016bc1f0c7ca1fc1e9d53b069f440 | |
parent | 1902c3fee76661014114fb2e442731e881a1f7c8 (diff) |
Revert "Continue porting tag creation/deletion to Go (more)"port-user-tag-to-go
This reverts commit 8f715f90e9cf0d3e01ab78cd945dcab06d95685d.
-rw-r--r-- | internal/gitaly/service/operations/tags_test.go | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/internal/gitaly/service/operations/tags_test.go b/internal/gitaly/service/operations/tags_test.go index 074ff31fe..7f5e5494d 100644 --- a/internal/gitaly/service/operations/tags_test.go +++ b/internal/gitaly/service/operations/tags_test.go @@ -512,10 +512,6 @@ func testFailedUserCreateTagRequestDueToValidation(t *testing.T, ctx context.Con } func TestTagHookOutput(t *testing.T) { - testWithFeature(t, featureflag.GoUserDeleteTag, testTagHookOutput) -} - -func testTagHookOutput(t *testing.T, ctx context.Context) { serverSocketPath, stop := runOperationServiceServer(t) defer stop() @@ -565,11 +561,11 @@ func testTagHookOutput(t *testing.T, ctx context.Context) { for _, hookName := range gitlabPreHooks { for _, testCase := range testCases { t.Run(hookName+"/"+testCase.desc, func(t *testing.T) { - tagNameInput := "some-tag" - request := &gitalypb.UserDeleteTagRequest{ - Repository: testRepo, - TagName: []byte(tagNameInput), - User: testhelper.TestUser, + request := &gitalypb.UserCreateTagRequest{ + Repository: testRepo, + TagName: []byte("some-tag"), + TargetRevision: []byte("master"), + User: testhelper.TestUser, } ctx, cancel := testhelper.Context() @@ -579,11 +575,9 @@ func testTagHookOutput(t *testing.T, ctx context.Context) { require.NoError(t, err) defer remove() - defer exec.Command(command.GitPath(), "-C", testRepoPath, "tag", "-d", tagNameInput).Run() - testhelper.MustRunCommand(t, nil, "git", "-C", testRepoPath, "tag", tagNameInput) - - response, err := client.UserDeleteTag(ctx, request) + response, err := client.UserCreateTag(ctx, request) require.NoError(t, err) + require.Equal(t, false, response.Exists) require.Equal(t, testCase.output, response.PreReceiveError) }) } |