Skip to content

Commit b486201

Browse files
pjbgfbaloo
authored andcommitted
internal: Expand regex to fix build
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
1 parent ed8216c commit b486201

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plumbing/transport/test/receive_pack.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,12 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
206206
report, err := s.receivePackNoCheck(c, endpoint, req, fixture, full)
207207
//XXX: Recent git versions return "failed to update ref", while older
208208
// (>=1.9) return "failed to lock".
209-
c.Assert(err, ErrorMatches, ".*(failed to update ref|failed to lock).*")
209+
// More recent versions: command error on <ref>: reference already exists
210+
c.Assert(err, ErrorMatches, ".*(failed to update ref|failed to lock|reference already exists).*")
210211
c.Assert(report.UnpackStatus, Equals, "ok")
211212
c.Assert(len(report.CommandStatuses), Equals, 1)
212213
c.Assert(report.CommandStatuses[0].ReferenceName, Equals, plumbing.ReferenceName("refs/heads/master"))
213-
c.Assert(report.CommandStatuses[0].Status, Matches, "(failed to update ref|failed to lock)")
214+
c.Assert(report.CommandStatuses[0].Status, Matches, "(failed to update ref|failed to lock|reference already exists)")
214215
s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
215216
}
216217

0 commit comments

Comments
 (0)