aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-14 12:30:19 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-14 12:30:19 +0200
commit91bf16b2336e6f80f0742be729582fe5fbbada83 (patch)
tree935a95f72e824543970c8254c39cf0afa22b3410 /storage
parentf826cf9d42cc34e2ae5aaf6ede892ecab9d2f198 (diff)
downloadgo-git-91bf16b2336e6f80f0742be729582fe5fbbada83.tar.gz
core: removing Object.Content, the Reader should be used always
Diffstat (limited to 'storage')
-rw-r--r--storage/filesystem/object_test.go8
1 files changed, 6 insertions, 2 deletions
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
}