aboutsummaryrefslogtreecommitdiffstats
path: root/storage/test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/test')
-rw-r--r--storage/test/storage_suite.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/storage/test/storage_suite.go b/storage/test/storage_suite.go
index 9d63ff8..bf0d10d 100644
--- a/storage/test/storage_suite.go
+++ b/storage/test/storage_suite.go
@@ -17,6 +17,7 @@ import (
type Storer interface {
storer.EncodedObjectStorer
storer.ReferenceStorer
+ storer.ShallowStorer
config.ConfigStorer
}
@@ -263,6 +264,21 @@ func (s *BaseStorageSuite) TestIterReferences(c *C) {
c.Assert(err, Equals, io.EOF)
}
+func (s *BaseStorageSuite) TestSetShallowAndShallow(c *C) {
+ expected := []plumbing.Hash{
+ plumbing.NewHash("b66c08ba28aa1f81eb06a1127aa3936ff77e5e2c"),
+ plumbing.NewHash("c3f4688a08fd86f1bf8e055724c84b7a40a09733"),
+ plumbing.NewHash("c78874f116be67ecf54df225a613162b84cc6ebf"),
+ }
+
+ err := s.Storer.SetShallow(expected)
+ c.Assert(err, IsNil)
+
+ result, err := s.Storer.Shallow()
+ c.Assert(err, IsNil)
+ c.Assert(result, DeepEquals, expected)
+}
+
func (s *BaseStorageSuite) TestSetConfigAndConfig(c *C) {
expected := config.NewConfig()
expected.Core.IsBare = true