From 498dbf7dc92e288641f1af1acc52704150e8a6c0 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sun, 12 Feb 2017 23:03:30 +0100 Subject: storage: git.Storer move to storage.Storer and module handling --- storage/test/storage_suite.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'storage/test/storage_suite.go') 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() -- cgit