aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder_advanced_test.go
diff options
context:
space:
mode:
authorMiguel Molina <miguel@erizocosmi.co>2018-08-09 16:53:00 +0200
committerMiguel Molina <miguel@erizocosmi.co>2018-08-09 16:53:00 +0200
commit56c5e91b158bc4569b38bfd5d27d4b4be5e06a27 (patch)
treecb79fa3334edefbc0165aee8067cba0f9086e6e8 /plumbing/format/packfile/encoder_advanced_test.go
parentd93b3869f366df7488286614b0205968bc6263df (diff)
downloadgo-git-56c5e91b158bc4569b38bfd5d27d4b4be5e06a27.tar.gz
plumbing: packfile, open and close packfile on FSObject reads
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/format/packfile/encoder_advanced_test.go')
-rw-r--r--plumbing/format/packfile/encoder_advanced_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/plumbing/format/packfile/encoder_advanced_test.go b/plumbing/format/packfile/encoder_advanced_test.go
index 78ddc45..fc1419e 100644
--- a/plumbing/format/packfile/encoder_advanced_test.go
+++ b/plumbing/format/packfile/encoder_advanced_test.go
@@ -6,7 +6,7 @@ import (
"math/rand"
"testing"
- "gopkg.in/src-d/go-billy.v3/memfs"
+ "gopkg.in/src-d/go-billy.v4/memfs"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/format/idxfile"
. "gopkg.in/src-d/go-git.v4/plumbing/format/packfile"
@@ -84,7 +84,8 @@ func (s *EncoderAdvancedSuite) testEncodeDecode(
encodeHash, err := enc.Encode(hashes, packWindow)
c.Assert(err, IsNil)
- f, err := memfs.New().Create("packfile")
+ fs := memfs.New()
+ f, err := fs.Create("packfile")
c.Assert(err, IsNil)
_, err = f.Write(buf.Bytes())
@@ -105,7 +106,7 @@ func (s *EncoderAdvancedSuite) testEncodeDecode(
_, err = f.Seek(0, io.SeekStart)
c.Assert(err, IsNil)
- p := NewPackfile(index, f)
+ p := NewPackfile(index, fs, f)
decodeHash, err := p.ID()
c.Assert(err, IsNil)