aboutsummaryrefslogtreecommitdiffstats
path: root/storage/test
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-21 16:07:25 +0100
committerGitHub <noreply@github.com>2017-02-21 16:07:25 +0100
commit867b10692e5f8a34a82cc0a783bdb63e2b5ff398 (patch)
tree3ddb2f430ee3c958f0650cb7db6a9df44b1e1361 /storage/test
parent0b8b8da617d5a077f282e57d0300dc106a604236 (diff)
parent790fbdaddc3c9a434f2ad97d9eb56db9b6c99495 (diff)
downloadgo-git-867b10692e5f8a34a82cc0a783bdb63e2b5ff398.tar.gz
Merge pull request #270 from mcuadros/submodules-init
Submodules init and update
Diffstat (limited to 'storage/test')
-rw-r--r--storage/test/storage_suite.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/storage/test/storage_suite.go b/storage/test/storage_suite.go
index e09a673..2a10c78 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,7 @@ type Storer interface {
storer.ShallowStorer
storer.IndexStorer
config.ConfigStorer
+ storage.ModuleStorer
}
type TestObject struct {
@@ -321,7 +323,9 @@ func (s *BaseStorageSuite) TestSetConfigAndConfig(c *C) {
cfg, err := s.Storer.Config()
c.Assert(err, IsNil)
- c.Assert(cfg, DeepEquals, expected)
+
+ c.Assert(cfg.Core.IsBare, DeepEquals, expected.Core.IsBare)
+ c.Assert(cfg.Remotes, DeepEquals, expected.Remotes)
}
func (s *BaseStorageSuite) TestIndex(c *C) {
@@ -353,6 +357,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()