diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-09-08 09:31:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-08 09:31:20 +0200 |
commit | 208b3c3c32beaab14ebb7adf162fc136c939e99c (patch) | |
tree | 33e2e984150cebe2105d84479538128bfaf2ff93 /plumbing/format | |
parent | a4b12e4161738af6f724776c0c8c55f90542f06f (diff) | |
parent | 8f6b3127c1ff7661113fff2662416c328971a285 (diff) | |
download | go-git-208b3c3c32beaab14ebb7adf162fc136c939e99c.tar.gz |
Merge pull request #949 from kuba--/custom-cache
Expose Storage cache.
Diffstat (limited to 'plumbing/format')
-rw-r--r-- | plumbing/format/packfile/encoder_advanced_test.go | 7 |
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) }) } |