Skip to content

Commit

Permalink
fix iptb sharness...
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 28, 2024
1 parent 18b4c04 commit cad22e0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
9 changes: 3 additions & 6 deletions test/sharness/lib/iptb-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ startup_cluster() {
other_args="$@"
bound=$(expr "$num_nodes" - 1)

for i in $(test_seq 0 "$bound")
do
test_expect_success "node $i allows loopback addresses on lan dht" '
ipfsi $i config --json "Routing.LoopbackAddressesOnLanDHT" true
'
done
test_expect_success "set Routing.LoopbackAddressesOnLanDHT to true" '
iptb run [0-$bound] -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true
'

if test -n "$other_args"; then
test_expect_success "start up nodes with additional args" "
Expand Down
3 changes: 2 additions & 1 deletion test/sharness/t0131-multinode-client-routing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ run_single_file_test() {
NNODES=10

test_expect_success "set up testbed" '
iptb testbed create -type localipfs -count $NNODES -force -init
iptb testbed create -type localipfs -count $NNODES -force -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true
'

test_expect_success "start up nodes" '
Expand Down
3 changes: 2 additions & 1 deletion test/sharness/t0142-testfilter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ AF="/ip4/127.0.0.0/ipcidr/24"
NUM_NODES=3

test_expect_success "set up testbed" '
iptb testbed create -type localipfs -count $NUM_NODES -force -init
iptb testbed create -type localipfs -count $NUM_NODES -force -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true
'

test_expect_success 'filter 127.0.0.0/24 on node 1' '
Expand Down
1 change: 1 addition & 0 deletions test/sharness/t0181-private-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ LIBP2P_FORCE_PNET=1 test_launch_ipfs_daemon

test_expect_success "set up iptb testbed" '
iptb testbed create -type localipfs -count 5 -force -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true &&
iptb run -- ipfs config --json Addresses.Swarm '"'"'["/ip4/127.0.0.1/tcp/0"]'"'"'
'

Expand Down
3 changes: 2 additions & 1 deletion test/sharness/t0182-circuit-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ test_description="Test circuit relay"
# start iptb + wait for peering
NUM_NODES=3
test_expect_success 'init iptb' '
iptb testbed create -type localipfs -count $NUM_NODES -init
iptb testbed create -type localipfs -count $NUM_NODES -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true
'

# Network toplogy: A <-> Relay <-> B
Expand Down
1 change: 1 addition & 0 deletions test/sharness/t0184-http-proxy-over-p2p.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function curl_send_multipart_form_request() {

test_expect_success 'configure nodes' '
iptb testbed create -type localipfs -count 2 -force -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true &&
ipfsi 0 config --json Experimental.Libp2pStreamMounting true &&
ipfsi 1 config --json Experimental.Libp2pStreamMounting true &&
ipfsi 0 config --json Experimental.P2pHttpProxy true &&
Expand Down
3 changes: 2 additions & 1 deletion test/sharness/t0276-cidv0v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ test_expect_success "check that we can access the file when converted to CIDv1"
#

test_expect_success "set up iptb testbed" '
iptb testbed create -type localipfs -count 2 -init
iptb testbed create -type localipfs -count 2 -init &&
iptb run -- ipfs config --json "Routing.LoopbackAddressesOnLanDHT" true
'

test_expect_success "start nodes" '
Expand Down

0 comments on commit cad22e0

Please sign in to comment.