From 4b2d9b42bf18556bc51434e7221927c681bce746 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 12 Jun 2017 15:29:55 +0200 Subject: fix ReceivePackSuite.TestSendPackAddDeleteReference --- plumbing/transport/test/receive_pack.go | 6 ++++-- 1 file 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) } -- cgit