aboutsummaryrefslogtreecommitdiffstats
path: root/storage/test/storage_suite.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-12 23:03:30 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-02-12 23:03:30 +0100
commit498dbf7dc92e288641f1af1acc52704150e8a6c0 (patch)
tree7be1fab61a2eead003f07249c0312f71decaccf7 /storage/test/storage_suite.go
parent87a84b1cb90149cf81e76be46811341a30e4a367 (diff)
downloadgo-git-498dbf7dc92e288641f1af1acc52704150e8a6c0.tar.gz
storage: git.Storer move to storage.Storer and module handling
Diffstat (limited to 'storage/test/storage_suite.go')
-rw-r--r--storage/test/storage_suite.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/test/storage_suite.go b/storage/test/storage_suite.go
index 6fc2937..d6c8afa 100644
--- a/storage/test/storage_suite.go
+++ b/storage/test/storage_suite.go
@@ -11,6 +11,7 @@ import (
"srcd.works/go-git.v4/plumbing"
"srcd.works/go-git.v4/plumbing/format/index"
"srcd.works/go-git.v4/plumbing/storer"
+ "srcd.works/go-git.v4/storage"
. "gopkg.in/check.v1"
)
@@ -21,6 +22,8 @@ type Storer interface {
storer.ShallowStorer
storer.IndexStorer
config.ConfigStorer
+
+ storage.ModuleStorer
}
type TestObject struct {
@@ -326,6 +329,16 @@ func (s *BaseStorageSuite) TestSetConfigInvalid(c *C) {
c.Assert(err, NotNil)
}
+func (s *BaseStorageSuite) TestModule(c *C) {
+ storer, err := s.Storer.Module("foo")
+ c.Assert(err, IsNil)
+ c.Assert(storer, NotNil)
+
+ storer, err = s.Storer.Module("foo")
+ c.Assert(err, IsNil)
+ c.Assert(storer, NotNil)
+}
+
func objectEquals(a plumbing.EncodedObject, b plumbing.EncodedObject) error {
ha := a.Hash()
hb := b.Hash()