aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/test
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-06-12 15:29:55 +0200
committerSantiago M. Mola <santi@mola.io>2017-06-13 15:39:49 +0200
commit4b2d9b42bf18556bc51434e7221927c681bce746 (patch)
tree83afc763a5229851a33b46a0d372668cbb949a4a /plumbing/transport/test
parent9ebf0e651465fc304405d0253f837c1b5e929c24 (diff)
downloadgo-git-4b2d9b42bf18556bc51434e7221927c681bce746.tar.gz
fix ReceivePackSuite.TestSendPackAddDeleteReference
Diffstat (limited to 'plumbing/transport/test')
-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)
}