projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
5416: Improve variable names & filenames. Report original error if git fails with...
[arvados.git]
/
services
/
arv-git-httpd
/
server_test.go
diff --git
a/services/arv-git-httpd/server_test.go
b/services/arv-git-httpd/server_test.go
index 40f0128174cc9fc22c84632666fa70429e1ddf09..751e7e41c484fb659b6d875b75bb62124b4372e4 100644
(file)
--- a/
services/arv-git-httpd/server_test.go
+++ b/
services/arv-git-httpd/server_test.go
@@
-145,8
+145,11
@@
func (s *IntegrationSuite) runGit(c *check.C, gitCmd, repo string, args ...strin
go w.Close()
output, err := cmd.CombinedOutput()
c.Log("git ", gitargs, " => ", err)
go w.Close()
output, err := cmd.CombinedOutput()
c.Log("git ", gitargs, " => ", err)
- if err != nil {
- // Easier to match error strings without newlines.
+ if err != nil && len(output) > 0 {
+ // If messages appeared on stderr, they are more
+ // helpful than the err returned by CombinedOutput().
+ //
+ // Easier to match error strings without newlines:
err = errors.New(strings.Replace(string(output), "\n", " // ", -1))
}
return err
err = errors.New(strings.Replace(string(output), "\n", " // ", -1))
}
return err