aboutsummaryrefslogtreecommitdiffstats
path: root/blobs_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-11-08 23:46:38 +0100
committerGitHub <noreply@github.com>2016-11-08 23:46:38 +0100
commitac095bb12c4d29722b60ba9f20590fa7cfa6bc7d (patch)
tree223f36f336ba3414b1e45cac8af6c4744a5d7ef6 /blobs_test.go
parente523701393598f4fa241dd407af9ff8925507a1a (diff)
downloadgo-git-ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d.tar.gz
new plumbing package (#118)
* plumbing: now core was renamed to core, and formats and clients moved inside
Diffstat (limited to 'blobs_test.go')
-rw-r--r--blobs_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/blobs_test.go b/blobs_test.go
index b667fa4..a323744 100644
--- a/blobs_test.go
+++ b/blobs_test.go
@@ -4,7 +4,7 @@ import (
"io"
"io/ioutil"
- "gopkg.in/src-d/go-git.v4/core"
+ "gopkg.in/src-d/go-git.v4/plumbing"
. "gopkg.in/check.v1"
)
@@ -16,8 +16,8 @@ type BlobsSuite struct {
var _ = Suite(&BlobsSuite{})
func (s *BlobsSuite) TestBlobHash(c *C) {
- o := &core.MemoryObject{}
- o.SetType(core.BlobObject)
+ o := &plumbing.MemoryObject{}
+ o.SetType(plumbing.BlobObject)
o.SetSize(3)
writer, err := o.Writer()
@@ -42,11 +42,11 @@ func (s *BlobsSuite) TestBlobHash(c *C) {
}
func (s *BlobsSuite) TestBlobDecodeEncodeIdempotent(c *C) {
- var objects []*core.MemoryObject
+ var objects []*plumbing.MemoryObject
for _, str := range []string{"foo", "foo\n"} {
- obj := &core.MemoryObject{}
+ obj := &plumbing.MemoryObject{}
obj.Write([]byte(str))
- obj.SetType(core.BlobObject)
+ obj.SetType(plumbing.BlobObject)
obj.Hash()
objects = append(objects, obj)
}
@@ -54,7 +54,7 @@ func (s *BlobsSuite) TestBlobDecodeEncodeIdempotent(c *C) {
blob := &Blob{}
err := blob.Decode(object)
c.Assert(err, IsNil)
- newObject := &core.MemoryObject{}
+ newObject := &plumbing.MemoryObject{}
err = blob.Encode(newObject)
c.Assert(err, IsNil)
newObject.Hash() // Ensure Hash is pre-computed before deep comparison