From 91bf16b2336e6f80f0742be729582fe5fbbada83 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sun, 14 Aug 2016 12:30:19 +0200 Subject: core: removing Object.Content, the Reader should be used always --- storage/filesystem/object_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'storage') diff --git a/storage/filesystem/object_test.go b/storage/filesystem/object_test.go index a784525..5c4c7c8 100644 --- a/storage/filesystem/object_test.go +++ b/storage/filesystem/object_test.go @@ -2,6 +2,7 @@ package filesystem import ( "fmt" + "io/ioutil" "os" "reflect" "sort" @@ -195,9 +196,12 @@ func equalsObjects(a, b core.Object) (bool, string, error) { asz, bsz), nil } - ac := a.Content() + r, _ := b.Reader() + ac, _ := ioutil.ReadAll(r) if ac != nil { - bc := b.Content() + r, _ := b.Reader() + bc, _ := ioutil.ReadAll(r) + if !reflect.DeepEqual(ac, bc) { return false, fmt.Sprintf("object contents differ"), nil } -- cgit