aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-05-24 19:25:08 +0200
committerGitHub <noreply@github.com>2020-05-24 19:25:08 +0200
commit8019144b6534ff58ad234a355e5b143f1c99b45e (patch)
tree5a67682c34bb20a826ebf430f11181d6892fc0e7 /plumbing/format/packfile/encoder_test.go
parente7f544844d6d736acfd9d75ee0d4a9d37f450103 (diff)
parent10199949b9e5a71f72241c4bb23f3d733287065c (diff)
downloadgo-git-8019144b6534ff58ad234a355e5b143f1c99b45e.tar.gz
Merge pull request #73 from WKBae/close_objectv5.1.0
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()) {