Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
82fc506e
Commit
82fc506e
authored
Oct 13, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade gitaly image for workhorse integration test
parent
4428eb2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
.gitlab/ci/workhorse.gitlab-ci.yml
.gitlab/ci/workhorse.gitlab-ci.yml
+1
-1
workhorse/gitaly_integration_test.go
workhorse/gitaly_integration_test.go
+23
-2
No files found.
.gitlab/ci/workhorse.gitlab-ci.yml
View file @
82fc506e
...
...
@@ -10,7 +10,7 @@ workhorse:verify:
.workhorse:test:
extends
:
.workhorse:rules:workhorse
services
:
-
name
:
registry.gitlab.com/gitlab-org/build/cng/gitaly:
latest
-
name
:
registry.gitlab.com/gitlab-org/build/cng/gitaly:
master-ubi8
# Disable the hooks so we don't have to stub the GitLab API
command
:
[
"
/usr/bin/env"
,
"
GITALY_TESTING_NO_GIT_HOOKS=1"
,
"
/scripts/process-wrapper"
]
alias
:
gitaly
...
...
workhorse/gitaly_integration_test.go
View file @
82fc506e
...
...
@@ -16,6 +16,7 @@ import (
"strings"
"testing"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb"
...
...
@@ -53,6 +54,10 @@ 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
)
if
err
!=
nil
{
...
...
@@ -83,10 +88,18 @@ 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
...
...
@@ -107,10 +120,18 @@ func TestAllowedClone(t *testing.T) {
}
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment