aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder_test.go
diff options
context:
space:
mode:
authorKyungmin Bae <kyungmin.bae@devsisters.com>2020-05-24 02:29:58 +0900
committerKyungmin Bae <kyungmin.bae@devsisters.com>2020-05-24 02:29:58 +0900
commit10199949b9e5a71f72241c4bb23f3d733287065c (patch)
tree52b3efdb1944d9c833522d32a0af5c4b275a3ab6 /plumbing/format/packfile/encoder_test.go
parent6d8103df45ce09ffd5323b4ef46d26440400a54f (diff)
downloadgo-git-10199949b9e5a71f72241c4bb23f3d733287065c.tar.gz
Close Reader & Writer of EncodedObject after use
Diffstat (limited to 'plumbing/format/packfile/encoder_test.go')
-rw-r--r--plumbing/format/packfile/encoder_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plumbing/format/packfile/encoder_test.go b/plumbing/format/packfile/encoder_test.go
index 80d1e73..2689762 100644
--- a/plumbing/format/packfile/encoder_test.go
+++ b/plumbing/format/packfile/encoder_test.go
@@ -287,6 +287,12 @@ func objectsEqual(c *C, o1, o2 plumbing.EncodedObject) {
c.Assert(err, IsNil)
c.Assert(bytes.Compare(b1, b2), Equals, 0)
+
+ err = r2.Close()
+ c.Assert(err, IsNil)
+
+ err = r1.Close()
+ c.Assert(err, IsNil)
}
func packfileFromReader(c *C, buf *bytes.Buffer) (*Packfile, func()) {