aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/change_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-09-08 09:31:20 +0200
committerGitHub <noreply@github.com>2018-09-08 09:31:20 +0200
commit208b3c3c32beaab14ebb7adf162fc136c939e99c (patch)
tree33e2e984150cebe2105d84479538128bfaf2ff93 /plumbing/object/change_test.go
parenta4b12e4161738af6f724776c0c8c55f90542f06f (diff)
parent8f6b3127c1ff7661113fff2662416c328971a285 (diff)
downloadgo-git-208b3c3c32beaab14ebb7adf162fc136c939e99c.tar.gz
Merge pull request #949 from kuba--/custom-cache
Expose Storage cache.
Diffstat (limited to 'plumbing/object/change_test.go')
-rw-r--r--plumbing/object/change_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/plumbing/object/change_test.go b/plumbing/object/change_test.go
index b0e89c7..e2f0a23 100644
--- a/plumbing/object/change_test.go
+++ b/plumbing/object/change_test.go
@@ -5,6 +5,7 @@ import (
"sort"
"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/filemode"
"gopkg.in/src-d/go-git.v4/plumbing/format/diff"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
@@ -25,8 +26,7 @@ func (s *ChangeSuite) SetUpSuite(c *C) {
s.Suite.SetUpSuite(c)
s.Fixture = fixtures.ByURL("https://github.com/src-d/go-git.git").
ByTag(".git").One()
- sto, err := filesystem.NewStorage(s.Fixture.DotGit())
- c.Assert(err, IsNil)
+ sto := filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault())
s.Storer = sto
}
@@ -253,8 +253,7 @@ func (s *ChangeSuite) TestNoFileFilemodes(c *C) {
s.Suite.SetUpSuite(c)
f := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One()
- sto, err := filesystem.NewStorage(f.DotGit())
- c.Assert(err, IsNil)
+ sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault())
iter, err := sto.IterEncodedObjects(plumbing.AnyObject)
c.Assert(err, IsNil)