diff options
author | Gianni Gambetti <99784476+ggambetti@users.noreply.github.com> | 2024-05-24 15:02:15 -0400 |
---|---|---|
committer | Gianni Gambetti <99784476+ggambetti@users.noreply.github.com> | 2024-05-27 11:16:34 -0400 |
commit | 4070322588104631421ebb03d80dc293d7d5a54f (patch) | |
tree | 0289af95f3f97c1a807663b5e2de97bfc04a9066 /plumbing/transport/test/receive_pack.go | |
parent | c7feada87363f96c224214ba309efd5cf5a886fc (diff) | |
download | go-git-4070322588104631421ebb03d80dc293d7d5a54f.tar.gz |
plumbing: transport/http, Wrap http errors to return reason. Fixes #1097
Diffstat (limited to 'plumbing/transport/test/receive_pack.go')
-rw-r--r-- | plumbing/transport/test/receive_pack.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go index 9414fba..d4d2b10 100644 --- a/plumbing/transport/test/receive_pack.go +++ b/plumbing/transport/test/receive_pack.go @@ -9,6 +9,7 @@ import ( "os" "path/filepath" + . "github.com/go-git/go-git/v5/internal/test" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/format/packfile" "github.com/go-git/go-git/v5/plumbing/protocol/packp" @@ -42,7 +43,7 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) { r, err := s.Client.NewReceivePackSession(s.NonExistentEndpoint, s.EmptyAuth) c.Assert(err, IsNil) ar, err := r.AdvertisedReferences() - c.Assert(err, Equals, transport.ErrRepositoryNotFound) + c.Assert(err, ErrorIs, transport.ErrRepositoryNotFound) c.Assert(ar, IsNil) c.Assert(r.Close(), IsNil) @@ -54,7 +55,7 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) { } writer, err := r.ReceivePack(context.Background(), req) - c.Assert(err, Equals, transport.ErrRepositoryNotFound) + c.Assert(err, ErrorIs, transport.ErrRepositoryNotFound) c.Assert(writer, IsNil) c.Assert(r.Close(), IsNil) } |