Correctly written test for ipfs init with daemon
Travis Person committed
Apr 20, 2015 at 23:46 UTC
676fd50ca094fcb205e79bfe4d3c29edc17bcdb6
1 file changed
+4
-4
test/sharness/t0020-init.sh
+4
-4
@@ -48,10 +48,10 @@ test_init_ipfs
48
49
test_launch_ipfs_daemon
50
51
-test_expect_failure "ipfs init should not run while daemon is running" '
52
- ipfs init 2> daemon_running_err &&
53
- expect="Error: ipfs daemon is running. please stop it to run this command" &&
54
- cat daemon_running_err | grep $expect
51
+test_expect_success "ipfs init should not run while daemon is running" '
52
+ test_must_fail ipfs init 2> daemon_running_err &&
53
+ EXPECT="Error: ipfs daemon is running. please stop it to run this command" &&
54
+ grep "$EXPECT" daemon_running_err
55
'
56
57
test_kill_ipfs_daemon