提交 3803a6e5 作者: Steven Allen

ping: fixup sharness tests

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 6e2858e8
...@@ -27,8 +27,8 @@ test_expect_success "test ping other" ' ...@@ -27,8 +27,8 @@ test_expect_success "test ping other" '
test_expect_success "test ping unreachable peer" ' test_expect_success "test ping unreachable peer" '
printf "Looking up peer %s\n" "$BAD_PEER" > bad_ping_exp && printf "Looking up peer %s\n" "$BAD_PEER" > bad_ping_exp &&
printf "Peer lookup error: routing: not found\n" >> bad_ping_exp && printf "Error: peer lookup failed: routing: not found\n" >> bad_ping_exp &&
ipfsi 0 ping -n2 -- "$BAD_PEER" > bad_ping_actual && ! ipfsi 0 ping -n2 -- "$BAD_PEER" > bad_ping_actual 2>&1 &&
test_cmp bad_ping_exp bad_ping_actual test_cmp bad_ping_exp bad_ping_actual
' '
...@@ -42,8 +42,13 @@ test_expect_success "test ping 0" ' ...@@ -42,8 +42,13 @@ test_expect_success "test ping 0" '
! ipfsi 1 ping -n0 -- "$PEERID_0" ! ipfsi 1 ping -n0 -- "$PEERID_0"
' '
test_expect_success "test ping offline" '
iptb stop 1 &&
! ipfsi 0 ping -n2 -- "$PEERID_1"
'
test_expect_success 'stop iptb' ' test_expect_success 'stop iptb' '
iptb stop iptb stop 0
' '
test_done test_done
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论