diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-25 20:30:36 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-25 20:30:36 +0100 |
commit | 9a44cd8ccff143a112436c38bfe5581e74b68f07 (patch) | |
tree | f4d2f38cc61647bf159a7c870913e6f6b60828b2 /remote_test.go | |
parent | be69a505926451bf10450ac68d40265a6f43e150 (diff) | |
download | go-git-9a44cd8ccff143a112436c38bfe5581e74b68f07.tar.gz |
formats/packfile: new reader API
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/remote_test.go b/remote_test.go index 6cdbce0..5674407 100644 --- a/remote_test.go +++ b/remote_test.go @@ -1,6 +1,7 @@ package git import ( + "gopkg.in/src-d/go-git.v2/common" "gopkg.in/src-d/go-git.v2/formats/packfile" . "gopkg.in/check.v1" @@ -40,10 +41,10 @@ func (s *SuiteRemote) TestFetchDefaultBranch(c *C) { reader, err := r.FetchDefaultBranch() c.Assert(err, IsNil) - pr, err := packfile.NewPackfileReader(reader, nil) - c.Assert(err, IsNil) + pr := packfile.NewReader(reader) - ch, err := pr.Read() + storage := common.NewRAWObjectStorage() + _, err = pr.Read(storage) c.Assert(err, IsNil) - c.Assert(ch, NotNil) + c.Assert(storage.Objects, HasLen, 28) } |