aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/storage_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 /storage/filesystem/storage_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 'storage/filesystem/storage_test.go')
-rw-r--r--storage/filesystem/storage_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/filesystem/storage_test.go b/storage/filesystem/storage_test.go
index 7f85ef5..6fa0d90 100644
--- a/storage/filesystem/storage_test.go
+++ b/storage/filesystem/storage_test.go
@@ -4,6 +4,7 @@ import (
"io/ioutil"
"testing"
+ "gopkg.in/src-d/go-git.v4/plumbing/cache"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
"gopkg.in/src-d/go-git.v4/storage/test"
@@ -23,8 +24,7 @@ var _ = Suite(&StorageSuite{})
func (s *StorageSuite) SetUpTest(c *C) {
s.dir = c.MkDir()
- storage, err := NewStorage(osfs.New(s.dir))
- c.Assert(err, IsNil)
+ storage := NewStorage(osfs.New(s.dir), cache.NewObjectLRUDefault())
setUpTest(s, c, storage)
}
@@ -44,8 +44,7 @@ func setUpTest(s *StorageSuite, c *C, storage *Storage) {
func (s *StorageSuite) TestFilesystem(c *C) {
fs := memfs.New()
- storage, err := NewStorage(fs)
- c.Assert(err, IsNil)
+ storage := NewStorage(fs, cache.NewObjectLRUDefault())
c.Assert(storage.Filesystem(), Equals, fs)
}
@@ -64,10 +63,10 @@ var _ = Suite(&StorageExclusiveSuite{})
func (s *StorageExclusiveSuite) SetUpTest(c *C) {
s.dir = c.MkDir()
- storage, err := NewStorageWithOptions(
+ storage := NewStorageWithOptions(
osfs.New(s.dir),
+ cache.NewObjectLRUDefault(),
Options{ExclusiveAccess: true})
- c.Assert(err, IsNil)
setUpTest(&s.StorageSuite, c, storage)
}