Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/gitaly_integration_test.go')
-rw-r--r--workhorse/gitaly_integration_test.go32
1 files changed, 8 insertions, 24 deletions
diff --git a/workhorse/gitaly_integration_test.go b/workhorse/gitaly_integration_test.go
index 95e0a03ab6b..b6842808480 100644
--- a/workhorse/gitaly_integration_test.go
+++ b/workhorse/gitaly_integration_test.go
@@ -16,7 +16,6 @@ import (
"strings"
"testing"
- "github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
@@ -54,12 +53,13 @@ func realGitalyOkBody(t *testing.T) *api.Response {
return realGitalyAuthResponse(gitOkBody(t))
}
-func realGitalyOkBodyWithSidechannel(t *testing.T) *api.Response {
- return realGitalyAuthResponse(gitOkBodyWithSidechannel(t))
-}
-
func ensureGitalyRepository(t *testing.T, apiResponse *api.Response) error {
- ctx, namespace, err := gitaly.NewNamespaceClient(context.Background(), apiResponse.GitalyServer)
+ ctx, namespace, err := gitaly.NewNamespaceClient(
+ context.Background(),
+ apiResponse.GitalyServer,
+ gitaly.WithFeatures(apiResponse.GitalyServer.Features),
+ )
+
if err != nil {
return err
}
@@ -88,18 +88,10 @@ func ensureGitalyRepository(t *testing.T, apiResponse *api.Response) error {
}
func TestAllowedClone(t *testing.T) {
- testAllowedClone(t, realGitalyOkBody(t))
-}
-
-func TestAllowedCloneWithSidechannel(t *testing.T) {
- gitaly.InitializeSidechannelRegistry(logrus.StandardLogger())
- testAllowedClone(t, realGitalyOkBodyWithSidechannel(t))
-}
-
-func testAllowedClone(t *testing.T, apiResponse *api.Response) {
skipUnlessRealGitaly(t)
// Create the repository in the Gitaly server
+ apiResponse := realGitalyOkBody(t)
require.NoError(t, ensureGitalyRepository(t, apiResponse))
// Prepare test server and backend
@@ -120,18 +112,10 @@ func testAllowedClone(t *testing.T, apiResponse *api.Response) {
}
func TestAllowedShallowClone(t *testing.T) {
- testAllowedShallowClone(t, realGitalyOkBody(t))
-}
-
-func TestAllowedShallowCloneWithSidechannel(t *testing.T) {
- gitaly.InitializeSidechannelRegistry(logrus.StandardLogger())
- testAllowedShallowClone(t, realGitalyOkBodyWithSidechannel(t))
-}
-
-func testAllowedShallowClone(t *testing.T, apiResponse *api.Response) {
skipUnlessRealGitaly(t)
// Create the repository in the Gitaly server
+ apiResponse := realGitalyOkBody(t)
require.NoError(t, ensureGitalyRepository(t, apiResponse))
// Prepare test server and backend