[ARVADOS] updated: 10f1b33d43d0cbfa5a3cc5f506ee17eaeb441bd6

git at public.curoverse.com git at public.curoverse.com
Thu Feb 4 18:28:57 EST 2016


Summary of changes:
 services/keepstore/volume_generic_test.go | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

       via  10f1b33d43d0cbfa5a3cc5f506ee17eaeb441bd6 (commit)
      from  04d8b36c6460dbae3920d41c58b1cc2405dc59e7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 10f1b33d43d0cbfa5a3cc5f506ee17eaeb441bd6
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Feb 4 18:28:43 2016 -0500

    8178: Stop accepting zeroed data, now that the s3test bug is fixed.

diff --git a/services/keepstore/volume_generic_test.go b/services/keepstore/volume_generic_test.go
index 975202a..5810411 100644
--- a/services/keepstore/volume_generic_test.go
+++ b/services/keepstore/volume_generic_test.go
@@ -718,7 +718,10 @@ func testTrashUntrash(t TB, factory TestableVolumeFactory) {
 
 	buf, err := v.Get(TestHash)
 	if err != nil {
-		t.Errorf("got err %v, expected nil", err)
+		t.Fatal(err)
+	}
+	if bytes.Compare(buf, TestBlock) != 0 {
+		t.Errorf("Got data %+q, expected %+q", buf, TestBlock)
 	}
 	bufs.Put(buf)
 
@@ -726,11 +729,11 @@ func testTrashUntrash(t TB, factory TestableVolumeFactory) {
 	err = v.Trash(TestHash)
 	if v.Writable() == false {
 		if err != MethodDisabledError {
-			t.Errorf("Expected MethodDisabledError during Trash from a read-only volume")
+			t.Error(err)
 		}
 	} else if err != nil {
 		if err != ErrNotImplemented {
-			t.Errorf("Error during trash: %v", err.Error())
+			t.Error(err)
 		}
 	} else {
 		_, err = v.Get(TestHash)
@@ -741,19 +744,17 @@ func testTrashUntrash(t TB, factory TestableVolumeFactory) {
 		// Untrash
 		err = v.Untrash(TestHash)
 		if err != nil {
-			t.Errorf("Error during untrash: %v", err.Error())
+			t.Fatal(err)
 		}
 	}
 
 	// Get the block - after trash and untrash sequence
-	// Backdating block is resulting in emptying out the block in s3 test setup
-	// Hence, compare the Get respose with buf (obtained after put, instead of TestBlock)
-	buf2, err := v.Get(TestHash)
+	buf, err = v.Get(TestHash)
 	if err != nil {
-		t.Errorf("Error during Get: %v", err.Error())
-	} else {
-		if bytes.Compare(buf2, buf) != 0 {
-			t.Errorf("Got data %+q, expected %+q", buf2, buf)
-		}
+		t.Fatal(err)
 	}
+	if bytes.Compare(buf, TestBlock) != 0 {
+		t.Errorf("Got data %+q, expected %+q", buf, TestBlock)
+	}
+	bufs.Put(buf)
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list