5416: Do not blow up tests when git global config is uninitialized.
authorTom Clegg <tom@curoverse.com>
Wed, 8 Apr 2015 16:03:44 +0000 (12:03 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 8 Apr 2015 16:03:44 +0000 (12:03 -0400)
services/arv-git-httpd/server_test.go

index 5796445d682d391582cf20b1fc50aaeed0311c75..e7dd8fecc6c8d5f0a161048bbe8185705674748e 100644 (file)
@@ -83,11 +83,11 @@ func (s *IntegrationSuite) SetUpTest(c *check.C) {
        c.Assert(err, check.Equals, nil)
        _, err = exec.Command("git", "init", s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666").Output()
        c.Assert(err, check.Equals, nil)
-       _, err = exec.Command("sh", "-c", "cd "+s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666 && echo test >test && git add test && git commit -am 'foo: test'").CombinedOutput()
+       _, err = exec.Command("sh", "-c", "cd "+s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666 && echo test >test && git add test && git -c user.name=Foo -c user.email=Foo commit -am 'foo: test'").CombinedOutput()
        c.Assert(err, check.Equals, nil)
        _, err = exec.Command("git", "init", s.tmpWorkdir).Output()
        c.Assert(err, check.Equals, nil)
-       _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && echo work >work && git add work && git commit -am 'workdir: test'").CombinedOutput()
+       _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && echo work >work && git add work && git -c user.name=Foo -c user.email=Foo commit -am 'workdir: test'").CombinedOutput()
        c.Assert(err, check.Equals, nil)
 
        theConfig = &config{