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
4143d645
Commit
4143d645
authored
Aug 26, 2020
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: block until grpc server has stopped
parent
9a4a1d48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
gitaly_test.go
gitaly_test.go
+15
-15
internal/git/upload-pack_test.go
internal/git/upload-pack_test.go
+1
-1
No files found.
gitaly_test.go
View file @
4143d645
...
...
@@ -58,7 +58,7 @@ func TestFailedCloneNoGitaly(t *testing.T) {
func
TestGetInfoRefsProxiedToGitalySuccessfully
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
...
...
@@ -143,7 +143,7 @@ func TestGetInfoRefsProxiedToGitalySuccessfully(t *testing.T) {
func
TestGetInfoRefsProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
apiResponse
:=
gitOkBody
(
t
)
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
apiResponse
.
GitalyServer
.
Address
=
gitalyAddress
...
...
@@ -179,7 +179,7 @@ func TestPostReceivePackProxiedToGitalySuccessfully(t *testing.T) {
apiResponse
:=
gitOkBody
(
t
)
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
apiResponse
.
GitalyServer
.
Address
=
"unix:"
+
socketPath
apiResponse
.
GitConfigOptions
=
[]
string
{
"git-config-hello=world"
}
...
...
@@ -225,7 +225,7 @@ func TestPostReceivePackProxiedToGitalyInterrupted(t *testing.T) {
apiResponse
:=
gitOkBody
(
t
)
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
apiResponse
.
GitalyServer
.
Address
=
"unix:"
+
socketPath
ts
:=
testAuthServer
(
nil
,
nil
,
200
,
apiResponse
)
...
...
@@ -280,7 +280,7 @@ func TestPostUploadPackProxiedToGitalySuccessfully(t *testing.T) {
apiResponse
.
ShowAllRefs
=
tc
.
showAllRefs
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
tc
.
code
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
apiResponse
.
GitalyServer
.
Address
=
"unix:"
+
socketPath
ts
:=
testAuthServer
(
nil
,
nil
,
200
,
apiResponse
)
...
...
@@ -349,7 +349,7 @@ func TestPostUploadPackProxiedToGitalyInterrupted(t *testing.T) {
apiResponse
:=
gitOkBody
(
t
)
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
apiResponse
.
GitalyServer
.
Address
=
"unix:"
+
socketPath
ts
:=
testAuthServer
(
nil
,
nil
,
200
,
apiResponse
)
...
...
@@ -386,7 +386,7 @@ func TestPostUploadPackProxiedToGitalyInterrupted(t *testing.T) {
func
TestGetDiffProxiedToGitalySuccessfully
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -406,7 +406,7 @@ func TestGetDiffProxiedToGitalySuccessfully(t *testing.T) {
func
TestGetPatchProxiedToGitalySuccessfully
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -426,7 +426,7 @@ func TestGetPatchProxiedToGitalySuccessfully(t *testing.T) {
func
TestGetBlobProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -457,7 +457,7 @@ func TestGetBlobProxiedToGitalyInterruptedStream(t *testing.T) {
func
TestGetArchiveProxiedToGitalySuccessfully
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -498,7 +498,7 @@ func TestGetArchiveProxiedToGitalySuccessfully(t *testing.T) {
func
TestGetArchiveProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -531,7 +531,7 @@ func TestGetArchiveProxiedToGitalyInterruptedStream(t *testing.T) {
func
TestGetDiffProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -563,7 +563,7 @@ func TestGetDiffProxiedToGitalyInterruptedStream(t *testing.T) {
func
TestGetPatchProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
repoStorage
:=
"default"
...
...
@@ -595,7 +595,7 @@ func TestGetPatchProxiedToGitalyInterruptedStream(t *testing.T) {
func
TestGetSnapshotProxiedToGitalySuccessfully
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
expectedBody
:=
testhelper
.
GitalyGetSnapshotResponseMock
...
...
@@ -617,7 +617,7 @@ func TestGetSnapshotProxiedToGitalySuccessfully(t *testing.T) {
func
TestGetSnapshotProxiedToGitalyInterruptedStream
(
t
*
testing
.
T
)
{
gitalyServer
,
socketPath
:=
startGitalyServer
(
t
,
codes
.
OK
)
defer
gitalyServer
.
Stop
()
defer
gitalyServer
.
Graceful
Stop
()
gitalyAddress
:=
"unix:"
+
socketPath
...
...
internal/git/upload-pack_test.go
View file @
4143d645
...
...
@@ -80,7 +80,7 @@ func startSmartHTTPServer(t testing.TB, s gitalypb.SmartHTTPServiceServer) (stri
}()
return
fmt
.
Sprintf
(
"%s://%s"
,
ln
.
Addr
()
.
Network
(),
ln
.
Addr
()
.
String
()),
func
()
{
srv
.
Stop
()
srv
.
Graceful
Stop
()
assert
.
NoError
(
t
,
os
.
RemoveAll
(
tmp
),
"error removing temp dir %q"
,
tmp
)
}
}
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