diff options
Diffstat (limited to 'plumbing/transport/test/receive_pack.go')
-rw-r--r-- | plumbing/transport/test/receive_pack.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go index 066e684..bb1c58a 100644 --- a/plumbing/transport/test/receive_pack.go +++ b/plumbing/transport/test/receive_pack.go @@ -39,10 +39,10 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesEmpty(c *C) { func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) { r, err := s.Client.NewReceivePackSession(s.NonExistentEndpoint, s.EmptyAuth) c.Assert(err, IsNil) - defer func() { c.Assert(r.Close(), IsNil) }() ar, err := r.AdvertisedReferences() c.Assert(err, Equals, transport.ErrRepositoryNotFound) c.Assert(ar, IsNil) + c.Assert(r.Close(), IsNil) r, err = s.Client.NewReceivePackSession(s.NonExistentEndpoint, s.EmptyAuth) c.Assert(err, IsNil) @@ -54,6 +54,7 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) { writer, err := r.ReceivePack(req) c.Assert(err, Equals, transport.ErrRepositoryNotFound) c.Assert(writer, IsNil) + c.Assert(r.Close(), IsNil) } func (s *ReceivePackSuite) TestCallAdvertisedReferenceTwice(c *C) { |