diff options
Diffstat (limited to 'internal/service/operations/branches_test.go')
-rw-r--r-- | internal/service/operations/branches_test.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/internal/service/operations/branches_test.go b/internal/service/operations/branches_test.go index 7b6597afd..125499c44 100644 --- a/internal/service/operations/branches_test.go +++ b/internal/service/operations/branches_test.go @@ -20,10 +20,10 @@ func TestSuccessfulUserCreateBranchRequest(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() startPoint := "c7fbe50c7c7419d9701eebe64b1fdacc3df5b9dd" @@ -79,10 +79,10 @@ func TestSuccessfulGitHooksForUserCreateBranchRequest(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() branchName := "new-branch" @@ -117,10 +117,10 @@ func TestFailedUserCreateBranchDueToHooks(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() request := &gitalypb.UserCreateBranchRequest{ @@ -152,10 +152,10 @@ func TestFailedUserCreateBranchDueToHooks(t *testing.T) { } func TestFailedUserCreateBranchRequest(t *testing.T) { - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() testRepo, _, cleanupFn := testhelper.NewTestRepo(t) @@ -224,10 +224,10 @@ func TestSuccessfulUserDeleteBranchRequest(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() branchNameInput := "to-be-deleted-soon-branch" @@ -259,10 +259,10 @@ func TestSuccessfulGitHooksForUserDeleteBranchRequest(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() branchNameInput := "to-be-deleted-soon-branch" @@ -302,10 +302,10 @@ func TestSuccessfulGitHooksForUserDeleteBranchRequest(t *testing.T) { } func TestFailedUserDeleteBranchDueToValidation(t *testing.T) { - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() testRepo, _, cleanupFn := testhelper.NewTestRepo(t) @@ -364,10 +364,10 @@ func TestFailedUserDeleteBranchDueToHooks(t *testing.T) { testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t) defer cleanupFn() - server, serverSocketPath := runOperationServiceServer(t) + server, serverSocketPath := testhelper.RunOpSvcServer(t, NewServer) defer server.Stop() - client, conn := newOperationClient(t, serverSocketPath) + client, conn := testhelper.NewOpSvcCli(t, serverSocketPath) defer conn.Close() branchNameInput := "to-be-deleted-soon-branch" |