aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-12-06 22:25:54 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2016-12-06 22:42:05 +0100
commit17e3f85613b511c4134ebba5648142887a7b8812 (patch)
treea519df23441630bda8fb6b0dc95dad251cf25ee9
parent4429dffca6f4185d09a22725baa728b535c009a7 (diff)
downloadgo-git-17e3f85613b511c4134ebba5648142887a7b8812.tar.gz
repository: fix test setting global config
-rw-r--r--.travis.yml2
-rw-r--r--repository_test.go5
2 files changed, 3 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 937b6d0..47eaea2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,6 +14,8 @@ before_install:
# we only decrypt the SSH key when we aren't in a pull request
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash .travis/install_key.sh; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export SSH_AUTH_SOCK="" ; fi'
+ - git config --global user.email "travis@example.com"
+ - git config --global user.name "Travis CI"
install:
- rm -rf $GOPATH/src/gopkg.in/src-d
diff --git a/repository_test.go b/repository_test.go
index 316cdb1..a0c79a3 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -254,8 +254,6 @@ func (s *RepositorySuite) TestPullA(c *C) {
ExecuteOnPath(c, path,
"touch foo",
"git add foo",
- "git config --global user.email you@foo.com",
- "git config --global user.name foo",
"git commit -m foo foo",
)
@@ -455,7 +453,6 @@ func ExecuteOnPath(c *C, path string, cmds ...string) error {
func executeOnPath(path, cmd string) error {
args := strings.Split(cmd, " ")
-
c := exec.Command(args[0], args[1:]...)
c.Dir = path
c.Env = os.Environ()
@@ -464,7 +461,7 @@ func executeOnPath(path, cmd string) error {
c.Stderr = buf
c.Stdout = buf
- //defer func() { fmt.Println(buf.String()) }()
+ defer func() { fmt.Println(buf.String()) }()
return c.Run()
}