aboutsummaryrefslogtreecommitdiffstats
path: root/objects_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-12 02:22:08 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-12 02:22:08 +0200
commitd57f90b78eeb6b09b15e3fe57609ede66df4edac (patch)
tree961aa929391c0e804f32d26016f9e385f6e70ecb /objects_test.go
parent58fe211f1b0e4863b425542d2fad15803276fd66 (diff)
downloadgo-git-d57f90b78eeb6b09b15e3fe57609ede66df4edac.tar.gz
fixtures: new fixture package being use in all packages
Diffstat (limited to 'objects_test.go')
-rw-r--r--objects_test.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/objects_test.go b/objects_test.go
index da9dced..d28ff21 100644
--- a/objects_test.go
+++ b/objects_test.go
@@ -9,31 +9,19 @@ import (
. "gopkg.in/check.v1"
)
-var fixtures = []packedFixture{
+var fixturesURL = []packedFixture{
{"https://github.com/spinnaker/spinnaker.git", "formats/packfile/fixtures/spinnaker-spinnaker.pack"},
}
type ObjectsSuite struct {
BaseSuite
- r *Repository
- repos map[string]*Repository
}
var _ = Suite(&ObjectsSuite{})
-func (s *ObjectsSuite) SetUpSuite(c *C) {
- s.BaseSuite.SetUpSuite(c)
-
- s.r = NewMemoryRepository()
- err := s.r.Clone(&CloneOptions{URL: RepositoryFixture})
- c.Assert(err, IsNil)
-
- s.repos = unpackFixtures(c, tagFixtures)
-}
-
func (s *ObjectsSuite) TestNewCommit(c *C) {
hash := core.NewHash("a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")
- commit, err := s.r.Commit(hash)
+ commit, err := s.Repository.Commit(hash)
c.Assert(err, IsNil)
c.Assert(commit.Hash, Equals, commit.ID())
@@ -61,7 +49,7 @@ func (s *ObjectsSuite) TestNewCommit(c *C) {
func (s *ObjectsSuite) TestParseTree(c *C) {
hash := core.NewHash("a8d315b2b1c615d43042c3a62402b8a54288cf5c")
- tree, err := s.r.Tree(hash)
+ tree, err := s.Repository.Tree(hash)
c.Assert(err, IsNil)
c.Assert(tree.Entries, HasLen, 8)