aboutsummaryrefslogtreecommitdiffstats
path: root/common_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 /common_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 'common_test.go')
-rw-r--r--common_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/common_test.go b/common_test.go
index efe1ecc..dad0a37 100644
--- a/common_test.go
+++ b/common_test.go
@@ -4,6 +4,7 @@ import (
"testing"
"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/packfile"
"gopkg.in/src-d/go-git.v4/plumbing/transport"
"gopkg.in/src-d/go-git.v4/storage/filesystem"
@@ -59,10 +60,7 @@ func (s *BaseSuite) NewRepository(f *fixtures.Fixture) *Repository {
dotgit = f.DotGit()
worktree = memfs.New()
- st, err := filesystem.NewStorage(dotgit)
- if err != nil {
- panic(err)
- }
+ st := filesystem.NewStorage(dotgit, cache.NewObjectLRUDefault())
r, err := Open(st, worktree)
if err != nil {
@@ -89,10 +87,7 @@ func (s *BaseSuite) NewRepositoryWithEmptyWorktree(f *fixtures.Fixture) *Reposit
worktree := memfs.New()
- st, err := filesystem.NewStorage(dotgit)
- if err != nil {
- panic(err)
- }
+ st := filesystem.NewStorage(dotgit, cache.NewObjectLRUDefault())
r, err := Open(st, worktree)
if err != nil {