diff options
author | kuba-- <kuba@sourced.tech> | 2018-09-07 09:27:35 +0200 |
---|---|---|
committer | kuba-- <kuba@sourced.tech> | 2018-09-07 13:48:18 +0200 |
commit | 8f6b3127c1ff7661113fff2662416c328971a285 (patch) | |
tree | 3b127a5edf22140c5a710612cb5e4fcc3879664a /storage/filesystem/storage_test.go | |
parent | d3cec13ac0b195bfb897ed038a08b5130ab9969e (diff) | |
download | go-git-8f6b3127c1ff7661113fff2662416c328971a285.tar.gz |
Expose Storage cache.
Signed-off-by: kuba-- <kuba@sourced.tech>
Diffstat (limited to 'storage/filesystem/storage_test.go')
-rw-r--r-- | storage/filesystem/storage_test.go | 11 |
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) } |