From fb05a5fbb89154183201872b6f26f6bb259bb355 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Mon, 19 Sep 2016 19:37:03 -0700 Subject: [PATCH] trying to debug random test failures License: MIT Signed-off-by: Jeromy --- test/sharness/t0040-add-and-cat.sh | 3 ++- test/sharness/t0110-gateway.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/sharness/t0040-add-and-cat.sh b/test/sharness/t0040-add-and-cat.sh index 92f001762..f2cba4fe6 100755 --- a/test/sharness/t0040-add-and-cat.sh +++ b/test/sharness/t0040-add-and-cat.sh @@ -98,7 +98,8 @@ test_add_cat_5MB() { ' test_expect_success "'ipfs add bigfile' succeeds" ' - ipfs add mountdir/bigfile >actual + ipfs add mountdir/bigfile >actual || + test_fsh cat daemon_err ' test_expect_success "'ipfs add bigfile' output looks good" ' diff --git a/test/sharness/t0110-gateway.sh b/test/sharness/t0110-gateway.sh index 7556ef4d4..518750be0 100755 --- a/test/sharness/t0110-gateway.sh +++ b/test/sharness/t0110-gateway.sh @@ -21,9 +21,13 @@ apiport=$API_PORT # define a function to test a gateway, and do so for each port. # for now we check 5001 here as 5002 will be checked in gateway-writable. -test_expect_success "GET IPFS path succeeds" ' +test_expect_success "Make a file to test with" ' echo "Hello Worlds!" >expected && - HASH=$(ipfs add -q expected) && + HASH=$(ipfs add -q expected) || + test_fsh cat daemon_err +' + +test_expect_success "GET IPFS path succeeds" ' curl -sfo actual "http://127.0.0.1:$port/ipfs/$HASH" '