From 4d4f343df776e3bb202472967ffe7f3b16643232 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 16 Jul 2018 15:03:25 -0700 Subject: [PATCH] check hashes in urlstore sharness tests License: MIT Signed-off-by: Steven Allen --- test/sharness/t0272-urlstore.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/sharness/t0272-urlstore.sh b/test/sharness/t0272-urlstore.sh index 346c06da5..bc33efbd7 100755 --- a/test/sharness/t0272-urlstore.sh +++ b/test/sharness/t0272-urlstore.sh @@ -138,4 +138,13 @@ test_expect_success "files can not be retrieved via the urlstore" ' test_must_fail ipfs cat $HASH3 > /dev/null ' +test_expect_success "check that the hashes were correct" ' + HASH1e=$(ipfs add -q -n --cid-version=1 --raw-leaves=true file1) && + HASH2e=$(ipfs add -q -n --cid-version=1 --raw-leaves=true file2) && + HASH3e=$(ipfs add -q -n --cid-version=1 --raw-leaves=true file3) && + test $HASH1e = $HASH1 && + test $HASH2e = $HASH2 && + test $HASH3e = $HASH3 +' + test_done