tests: remove sharness ping tests
This was ported in 579175f81d400000881af5701c06351373df3fb8 but we forgot to remove it.
Jorropo committed
Sep 21, 2023 at 18:42 UTC
593614a08f8ce3784be562ffe9c615663cff6409
1 file changed
-54
test/sharness/t0041-ping.sh
deleted
-54
@@ -1,54 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-test_description="Test ping command"
4
-
5
-. lib/test-lib.sh
6
-
7
-test_init_ipfs
8
-
9
-BAD_PEER="QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJx"
10
-
11
-# start iptb + wait for peering
12
-test_expect_success 'init iptb' '
13
- iptb testbed create -type localipfs -count 2 -init
14
-'
15
-
16
-startup_cluster 2
17
-
18
-test_expect_success 'peer ids' '
19
- PEERID_0=$(iptb attr get 0 id) &&
20
- PEERID_1=$(iptb attr get 1 id)
21
-'
22
-
23
-test_expect_success "test ping other" '
24
- ipfsi 0 ping -n2 -- "$PEERID_1" &&
25
- ipfsi 1 ping -n2 -- "$PEERID_0"
26
-'
27
-
28
-test_expect_success "test ping unreachable peer" '
29
- printf "Looking up peer %s\n" "$BAD_PEER" > bad_ping_exp &&
30
- printf "PING QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJx.\nPing error: failed to dial: failed to dial QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJx: no addresses\nError: ping failed\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
-
35
-test_expect_success "test ping self" '
36
- ! ipfsi 0 ping -n2 -- "$PEERID_0" &&
37
- ! ipfsi 1 ping -n2 -- "$PEERID_1"
38
-'
39
-
40
-test_expect_success "test ping 0" '
41
- ! ipfsi 0 ping -n0 -- "$PEERID_1" &&
42
- ! ipfsi 1 ping -n0 -- "$PEERID_0"
43
-'
44
-
45
-test_expect_success "test ping offline" '
46
- iptb stop 1 && sleep 2 &&
47
- ! ipfsi 0 ping -n2 -- "$PEERID_1"
48
-'
49
-
50
-test_expect_success 'stop iptb' '
51
- iptb stop 0
52
-'
53
-
54
-test_done