aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/encoder_advanced_test.go
diff options
context:
space:
mode:
authorkuba-- <kuba@sourced.tech>2018-09-07 09:27:35 +0200
committerkuba-- <kuba@sourced.tech>2018-09-07 13:48:18 +0200
commit8f6b3127c1ff7661113fff2662416c328971a285 (patch)
tree3b127a5edf22140c5a710612cb5e4fcc3879664a /plumbing/format/packfile/encoder_advanced_test.go
parentd3cec13ac0b195bfb897ed038a08b5130ab9969e (diff)
downloadgo-git-8f6b3127c1ff7661113fff2662416c328971a285.tar.gz
Expose Storage cache.
Signed-off-by: kuba-- <kuba@sourced.tech>
Diffstat (limited to 'plumbing/format/packfile/encoder_advanced_test.go')
-rw-r--r--plumbing/format/packfile/encoder_advanced_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/plumbing/format/packfile/encoder_advanced_test.go b/plumbing/format/packfile/encoder_advanced_test.go
index fc1419e..e15126e 100644
--- a/plumbing/format/packfile/encoder_advanced_test.go
+++ b/plumbing/format/packfile/encoder_advanced_test.go
@@ -8,6 +8,7 @@ import (
"gopkg.in/src-d/go-billy.v4/memfs"
"gopkg.in/src-d/go-git.v4/plumbing"
+ "gopkg.in/src-d/go-git.v4/plumbing/cache"
"gopkg.in/src-d/go-git.v4/plumbing/format/idxfile"
. "gopkg.in/src-d/go-git.v4/plumbing/format/packfile"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
@@ -32,8 +33,7 @@ func (s *EncoderAdvancedSuite) TestEncodeDecode(c *C) {
fixs = append(fixs, fixtures.ByURL("https://github.com/src-d/go-git.git").
ByTag("packfile").ByTag(".git").One())
fixs.Test(c, func(f *fixtures.Fixture) {
- storage, err := filesystem.NewStorage(f.DotGit())
- c.Assert(err, IsNil)
+ storage := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault())
s.testEncodeDecode(c, storage, 10)
})
}
@@ -47,8 +47,7 @@ func (s *EncoderAdvancedSuite) TestEncodeDecodeNoDeltaCompression(c *C) {
fixs = append(fixs, fixtures.ByURL("https://github.com/src-d/go-git.git").
ByTag("packfile").ByTag(".git").One())
fixs.Test(c, func(f *fixtures.Fixture) {
- storage, err := filesystem.NewStorage(f.DotGit())
- c.Assert(err, IsNil)
+ storage := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault())
s.testEncodeDecode(c, storage, 0)
})
}