From a7b022702924acc3df3b5a396e789086cb74d8be Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 21 Apr 2015 15:49:02 +0200 Subject: [PATCH 1/2] t0030: encapsulate ipfs mount As described in issue #1109 on OSX some output from test_must_fail unfortunately goes into the "output" file that we use to test the output from "ipfs mount". This patch avoids the above by encapsulating the call to "ipfs mount" into a temporary function. License: MIT Signed-off-by: Christian Couder --- test/sharness/t0030-mount.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/sharness/t0030-mount.sh b/test/sharness/t0030-mount.sh index 1386275ef..b43dc051e 100755 --- a/test/sharness/t0030-mount.sh +++ b/test/sharness/t0030-mount.sh @@ -21,7 +21,8 @@ test_launch_ipfs_daemon # test mount failure before mounting properly. test_expect_success "'ipfs mount' fails when there is no mount dir" ' - test_must_fail ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err + tmp_ipfs_mount() { ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err; } && + test_must_fail tmp_ipfs_mount ' test_expect_failure "'ipfs mount' output looks good" ' From cc6eabf49f958354ab294d7e0c0650971805f26b Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 21 Apr 2015 15:52:33 +0200 Subject: [PATCH 2/2] t0030: expect good ipfs mount output As the ipfs mount call is now encapsulated in a temporary function (see previous commit) its output should not be tempered with by test_must_fail. License: MIT Signed-off-by: Christian Couder --- test/sharness/t0030-mount.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sharness/t0030-mount.sh b/test/sharness/t0030-mount.sh index b43dc051e..e6f917da9 100755 --- a/test/sharness/t0030-mount.sh +++ b/test/sharness/t0030-mount.sh @@ -25,7 +25,7 @@ test_expect_success "'ipfs mount' fails when there is no mount dir" ' test_must_fail tmp_ipfs_mount ' -test_expect_failure "'ipfs mount' output looks good" ' +test_expect_success "'ipfs mount' output looks good" ' test_must_be_empty output && test_should_contain "not_ipns\|not_ipfs" output.err '