From 60cae2079a8e9155db788e440eff706aee87b064 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Tue, 17 May 2016 10:49:13 -0700 Subject: [PATCH] check output hash for correctness License: MIT Signed-off-by: Jeromy --- test/sharness/t0051-object.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/sharness/t0051-object.sh b/test/sharness/t0051-object.sh index 9be1a063e..c47bf90f2 100755 --- a/test/sharness/t0051-object.sh +++ b/test/sharness/t0051-object.sh @@ -185,9 +185,15 @@ test_object_cmd() { N1=$(ipfs object patch $EMPTY_DIR add-link baz $EMPTY_DIR) && N2=$(ipfs object patch $EMPTY_DIR add-link bar $N1) && N3=$(ipfs object patch $EMPTY_DIR add-link foo /ipfs/$N2/bar) && - ipfs object stat /ipfs/$N3 && - ipfs object stat $N3/foo && - ipfs object stat /ipfs/$N3/foo/baz + ipfs object stat /ipfs/$N3 > /dev/null && + ipfs object stat $N3/foo > /dev/null && + ipfs object stat /ipfs/$N3/foo/baz > /dev/null + ' + + test_expect_success "object patch creation looks right" ' + echo "QmPc73aWK9dgFBXe86P4PvQizHo9e5Qt7n7DAMXWuigFuG" > hash_exp && + echo $N3 > hash_actual && + test_cmp hash_exp hash_actual ' test_expect_success "multilayer ipfs patch works" '