Merge branch '17984-cwl-project-uuid-users' into main
[arvados.git] / services / arv-git-httpd / integration_test.go
index 12ddc5b770940d767342cdaa871a299bfd3a113a..7da85ee7472af663a7307d7e91c46282689d98f7 100644 (file)
@@ -53,11 +53,14 @@ func (s *IntegrationSuite) SetUpTest(c *check.C) {
        c.Assert(err, check.Equals, nil)
        _, err = exec.Command("git", "init", "--bare", s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666.git").Output()
        c.Assert(err, check.Equals, nil)
+       // we need git 2.28 to specify the initial branch with -b; Buster only has 2.20; so we do it in 2 steps
        _, err = exec.Command("git", "init", s.tmpWorkdir).Output()
        c.Assert(err, check.Equals, nil)
+       _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && git checkout -b main").Output()
+       c.Assert(err, check.Equals, nil)
        _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && echo initial >initial && git add initial && git -c user.name=Initial -c user.email=Initial commit -am 'foo: initial commit'").CombinedOutput()
        c.Assert(err, check.Equals, nil)
-       _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && git push "+s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666.git master:master").CombinedOutput()
+       _, err = exec.Command("sh", "-c", "cd "+s.tmpWorkdir+" && git push "+s.tmpRepoRoot+"/zzzzz-s0uqq-382brsig8rp3666.git main:main").CombinedOutput()
        c.Assert(err, check.Equals, nil)
        _, 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)