diff options
-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) }) } |