From 0c2efb90d3896194ee18f28449503963972209cf Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Tue, 26 Jun 2018 19:15:44 -0400 Subject: [PATCH] More test fixes. License: MIT Signed-off-by: Kevin Atkinson --- test/sharness/t0272-urlstore.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/sharness/t0272-urlstore.sh b/test/sharness/t0272-urlstore.sh index e143edba4..dbffc1423 100755 --- a/test/sharness/t0272-urlstore.sh +++ b/test/sharness/t0272-urlstore.sh @@ -43,8 +43,8 @@ test_expect_success "add files using gateway address via url store" ' ' test_expect_success "make sure hashes are different" ' - echo $HASH1a $HASH1 ## FIXME - echo $HASH2a $HASH2 ## FIXME + test $HASH1a != $HASH1 && + test $HASH2a != $HASH2 ' test_expect_success "get files via urlstore" ' @@ -97,15 +97,19 @@ test_expect_success "ipfs filestore verify is correct" ' test_cmp verify_expect_2 verify_actual_2 ' -test_expect_failure "files can not be retrieved via the urlstore" ' - test_must_fail ipfs get $HASH1 && - test_must_fail ipfs get $HASH2 +test_expect_success "files can not be retrieved via the urlstore" ' + test_must_fail ipfs cat $HASH1 > /dev/null && + test_must_fail ipfs cat $HASH2 > /dev/null ' test_expect_success "add large file using gateway address via url store" ' HASH3=$(ipfs urlstore add http://127.0.0.1:$GWAY_PORT/ipfs/$HASH3a) ' +test_expect_success "make sure hashes are different" ' + test $HASH3a != $HASH3 +' + test_expect_success "get large file via urlstore" ' ipfs get $HASH3 -o file3.actual && test_cmp file3 file3.actual @@ -114,9 +118,9 @@ test_expect_success "get large file via urlstore" ' test_kill_ipfs_daemon test_expect_success "files can not be retrieved via the urlstore" ' - test_must_fail ipfs get $HASH1 && - test_must_fail ipfs get $HASH2 && - test_must_fail ipfs get $HASH3 + test_must_fail ipfs cat $HASH1 > /dev/null && + test_must_fail ipfs cat $HASH2 > /dev/null && + test_must_fail ipfs cat $HASH3 > /dev/null ' test_done