@cryptotaxi247 / kubo / commits / 3803a6e5e

ping: fixup sharness tests

License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed May 8, 2019 at 23:15 UTC 3803a6e5eb6ad9228675764e9ad77ff527120ca1
1 file changed +8 -3
test/sharness/t0041-ping.sh
+8 -3
@@ -27,8 +27,8 @@ test_expect_success "test ping other" '
27
28 test_expect_success "test ping unreachable peer" '
29 printf "Looking up peer %s\n" "$BAD_PEER" > bad_ping_exp &&
30 - printf "Peer lookup error: routing: not found\n" >> bad_ping_exp &&
31 - ipfsi 0 ping -n2 -- "$BAD_PEER" > bad_ping_actual &&
30 + printf "Error: peer lookup failed: routing: not found\n" >> bad_ping_exp &&
31 + ! ipfsi 0 ping -n2 -- "$BAD_PEER" > bad_ping_actual 2>&1 &&
32 test_cmp bad_ping_exp bad_ping_actual
33 '
34
@@ -42,8 +42,13 @@ test_expect_success "test ping 0" '
42 ! ipfsi 1 ping -n0 -- "$PEERID_0"
43 '
44
45 +test_expect_success "test ping offline" '
46 + iptb stop 1 &&
47 + ! ipfsi 0 ping -n2 -- "$PEERID_1"
48 +'
49 +
50 test_expect_success 'stop iptb' '
46 - iptb stop
51 + iptb stop 0
52 '
53
54 test_done