@cryptotaxi247 / kubo / commits / 31f4ef02c

Use test_launch_ipfs_daemon

License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

Stephen Whitmore committed Feb 19, 2016 at 20:05 UTC 31f4ef02c2d5e15e5c2c3b32a184c2b2dd423699
1 file changed +2 -14
test/sharness/t0060-daemon.sh
+2 -14
@@ -30,21 +30,9 @@ test_expect_success 'ipfs init & config' '
30 ipfs config --json=true Addresses.Swarm "[\"/ip4/0.0.0.0/tcp/4003\"]"
31 '
32
33 -# NOTE: this should remove bootstrap peers (needs a flag)
34 -# TODO(cryptix):
35 -# - we won't see daemon startup failure because we put the daemon in the background - fix: fork with exit code after api listen
36 -test_expect_success "ipfs daemon launches" '
37 - ipfs daemon >actual_daemon 2>daemon_err &
38 -'
39 -
40 -# this is like "'ipfs daemon' is ready" in test_launch_ipfs_daemon(), see test-lib.sh
41 -test_expect_success "initialization ended" '
42 - IPFS_PID=$! &&
43 - pollEndpoint -host='$API_ADDR' -ep=/version -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
44 - test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
45 -'
33 +test_launch_ipfs_daemon
34
47 -# this errors if daemon didnt --init $IPFS_PATH correctly
35 +# this errors if we didn't --init $IPFS_PATH correctly
36 test_expect_success "'ipfs config Identity.PeerID' works" '
37 PEERID=$(ipfs config Identity.PeerID)
38 '