projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
8555: Log statistics in EmptyTrash.
[arvados.git]
/
services
/
keepstore
/
volume_unix_test.go
diff --git
a/services/keepstore/volume_unix_test.go
b/services/keepstore/volume_unix_test.go
index 0775e89ed275d14f7e2be510084a52e39af84472..c95538bc4da380f7af5561984d7a069324cea970 100644
(file)
--- a/
services/keepstore/volume_unix_test.go
+++ b/
services/keepstore/volume_unix_test.go
@@
-106,12
+106,13
@@
func TestGetNotFound(t *testing.T) {
defer v.Teardown()
v.Put(TestHash, TestBlock)
defer v.Teardown()
v.Put(TestHash, TestBlock)
- buf, err := v.Get(TestHash2)
+ buf := make([]byte, BlockSize)
+ n, err := v.Get(TestHash2, buf)
switch {
case os.IsNotExist(err):
break
case err == nil:
switch {
case os.IsNotExist(err):
break
case err == nil:
- t.Errorf("Read should have failed, returned %
s", string(buf)
)
+ t.Errorf("Read should have failed, returned %
+q", buf[:n]
)
default:
t.Errorf("Read expected ErrNotExist, got: %s", err)
}
default:
t.Errorf("Read expected ErrNotExist, got: %s", err)
}
@@
-151,7
+152,8
@@
func TestUnixVolumeReadonly(t *testing.T) {
v.PutRaw(TestHash, TestBlock)
v.PutRaw(TestHash, TestBlock)
- _, err := v.Get(TestHash)
+ buf := make([]byte, BlockSize)
+ _, err := v.Get(TestHash, buf)
if err != nil {
t.Errorf("got err %v, expected nil", err)
}
if err != nil {
t.Errorf("got err %v, expected nil", err)
}