X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7bf0bc0355fde5829644df8557990cd2353d92b6..86b16fe1166b6dd261eebc3637a26573cf780ba3:/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 2d1aeb7849..45336010a1 100644 --- a/services/arv-git-httpd/server_test.go +++ b/services/arv-git-httpd/server_test.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( @@ -32,7 +36,7 @@ func (s *GitSuite) TestReadonly(c *check.C) { err := s.RunGit(c, spectatorToken, "fetch", "active/foo.git") c.Assert(err, check.Equals, nil) err = s.RunGit(c, spectatorToken, "push", "active/foo.git", "master:newbranchfail") - c.Assert(err, check.ErrorMatches, `.*HTTP code = 403.*`) + c.Assert(err, check.ErrorMatches, `.*HTTP (code = )?403.*`) _, err = os.Stat(s.tmpRepoRoot + "/zzzzz-s0uqq-382brsig8rp3666.git/refs/heads/newbranchfail") c.Assert(err, check.FitsTypeOf, &os.PathError{}) } @@ -66,7 +70,7 @@ func (s *GitSuite) TestNoPermission(c *check.C) { func (s *GitSuite) TestExpiredToken(c *check.C) { for _, repo := range []string{"active/foo.git", "active/foo/.git"} { err := s.RunGit(c, expiredToken, "fetch", repo) - c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`) + c.Assert(err, check.ErrorMatches, `.* (500 while accessing|requested URL returned error: 500).*`) } } @@ -80,7 +84,7 @@ func (s *GitSuite) TestInvalidToken(c *check.C) { func (s *GitSuite) TestShortToken(c *check.C) { for _, repo := range []string{"active/foo.git", "active/foo/.git"} { err := s.RunGit(c, "s3cr3t", "fetch", repo) - c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`) + c.Assert(err, check.ErrorMatches, `.* (500 while accessing|requested URL returned error: 500).*`) } }