aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plumbing/transport/test/receive_pack.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go
index f4be8c8..066e684 100644
--- a/plumbing/transport/test/receive_pack.go
+++ b/plumbing/transport/test/receive_pack.go
@@ -270,7 +270,6 @@ func (s *ReceivePackSuite) TestSendPackAddDeleteReference(c *C) {
func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
r, err := s.Client.NewReceivePackSession(s.Endpoint, s.EmptyAuth)
c.Assert(err, IsNil)
- defer func() { c.Assert(r.Close(), IsNil) }()
fixture := fixtures.Basic().ByTag("packfile").One()
@@ -285,6 +284,8 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
req.Capabilities.Set(capability.ReportStatus)
}
+ c.Assert(r.Close(), IsNil)
+
s.receivePack(c, s.Endpoint, req, nil, false)
s.checkRemoteReference(c, s.Endpoint, "refs/heads/newbranch", fixture.Head)
}
@@ -292,7 +293,6 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
r, err := s.Client.NewReceivePackSession(s.Endpoint, s.EmptyAuth)
c.Assert(err, IsNil)
- defer func() { c.Assert(r.Close(), IsNil) }()
fixture := fixtures.Basic().ByTag("packfile").One()
@@ -307,6 +307,8 @@ func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
req.Capabilities.Set(capability.ReportStatus)
}
+ c.Assert(r.Close(), IsNil)
+
s.receivePack(c, s.Endpoint, req, nil, false)
s.checkRemoteReference(c, s.Endpoint, "refs/heads/newbranch", plumbing.ZeroHash)
}