Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-workhorse
Commits
806290c2
Commit
806290c2
authored
Aug 02, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More output during `go test -v`
parent
713aae0e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
main_test.go
main_test.go
+9
-4
No files found.
main_test.go
View file @
806290c2
...
@@ -71,7 +71,9 @@ func TestDeniedClone(t *testing.T) {
...
@@ -71,7 +71,9 @@ func TestDeniedClone(t *testing.T) {
// Do the git clone
// Do the git clone
cloneCmd
:=
exec
.
Command
(
"git"
,
"clone"
,
remote
,
checkoutDir
)
cloneCmd
:=
exec
.
Command
(
"git"
,
"clone"
,
remote
,
checkoutDir
)
if
err
:=
cloneCmd
.
Run
();
err
==
nil
{
out
,
err
:=
cloneCmd
.
CombinedOutput
()
t
.
Logf
(
"%s"
,
out
)
if
err
==
nil
{
t
.
Fatal
(
"git clone should have failed"
)
t
.
Fatal
(
"git clone should have failed"
)
}
}
}
}
...
@@ -115,7 +117,9 @@ func TestDeniedPush(t *testing.T) {
...
@@ -115,7 +117,9 @@ func TestDeniedPush(t *testing.T) {
// Perform the git push
// Perform the git push
pushCmd
:=
exec
.
Command
(
"git"
,
"push"
,
remote
,
branch
)
pushCmd
:=
exec
.
Command
(
"git"
,
"push"
,
remote
,
branch
)
pushCmd
.
Dir
=
checkoutDir
pushCmd
.
Dir
=
checkoutDir
if
err
:=
pushCmd
.
Run
();
err
==
nil
{
out
,
err
:=
pushCmd
.
CombinedOutput
()
t
.
Logf
(
"%s"
,
out
)
if
err
==
nil
{
t
.
Fatal
(
"git push should have failed"
)
t
.
Fatal
(
"git push should have failed"
)
}
}
}
}
...
@@ -163,8 +167,9 @@ func waitServer() (err error) {
...
@@ -163,8 +167,9 @@ func waitServer() (err error) {
}
}
func
runOrFail
(
t
*
testing
.
T
,
cmd
*
exec
.
Cmd
)
{
func
runOrFail
(
t
*
testing
.
T
,
cmd
*
exec
.
Cmd
)
{
if
out
,
err
:=
cmd
.
CombinedOutput
();
err
!=
nil
{
out
,
err
:=
cmd
.
CombinedOutput
()
t
.
Logf
(
"%s"
,
out
)
t
.
Logf
(
"%s"
,
out
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
}
}
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