@cryptotaxi247 / kubo / commits / cca5212e0

Add sharness test

This test to make sure we can't run `ipfs init` while a daemon is currently running.

Travis Person committed Apr 20, 2015 at 18:35 UTC cca5212e098eb1684597cadb66a98a024cf221e0
1 file changed +11
test/sharness/t0020-init.sh
+11
@@ -44,4 +44,15 @@ test_expect_success "ipfs init output looks good" '
44 test_cmp expected actual_init
45 '
46
47 +test_launch_ipfs_daemon
48 +
49 +test_expect_failure "ipfs init should not run while daemon is running" '
50 + ipfs init 2> daemon_running_output
51 + echo "Error: ipfs daemon is running. please stop it to run this command" > daemon_running_expected
52 + echo "Use \'ipfs init --help\' for information about this command" >> daemon_running_expected
53 + test_cmp daemon_running_expected daemon_running_output
54 +'
55 +
56 +test_kill_ipfs_daemon
57 +
58 test_done