Add IPv6 support for P2P integration tests (#4340)

This commit is contained in:
Erik Grinaker
2020-01-27 10:40:54 +01:00
committed by GitHub
parent 696e13e1ff
commit 48be9bcb09
25 changed files with 204 additions and 121 deletions
+4 -3
View File
@@ -2,7 +2,8 @@
set -eu
set -o pipefail
ID=$1
IPV=$1
ID=$2
###########################################
#
@@ -10,9 +11,9 @@ ID=$1
#
###########################################
addr=$(test/p2p/ip.sh $ID):26657
addr=$(test/p2p/address.sh $IPV $ID 26657)
peerID=$(( $(($ID % 4)) + 1 )) # 1->2 ... 3->4 ... 4->1
peer_addr=$(test/p2p/ip.sh $peerID):26657
peer_addr=$(test/p2p/address.sh $IPV $peerID 26657)
# get another peer's height
h1=`curl -s $peer_addr/status | jq .result.sync_info.latest_block_height | jq fromjson`
+4 -5
View File
@@ -3,14 +3,13 @@ set -eu
DOCKER_IMAGE=$1
NETWORK_NAME=$2
N=$3
PROXY_APP=$4
cd $GOPATH/src/github.com/tendermint/tendermint
IPV=$3
N=$4
PROXY_APP=$5
# run it on each of them
for i in `seq 1 $N`; do
bash test/p2p/fast_sync/test_peer.sh $DOCKER_IMAGE $NETWORK_NAME $i $N $PROXY_APP
bash test/p2p/fast_sync/test_peer.sh $DOCKER_IMAGE $NETWORK_NAME $IPV $i $N $PROXY_APP
done
+8 -7
View File
@@ -3,9 +3,10 @@ set -eu
DOCKER_IMAGE=$1
NETWORK_NAME=$2
ID=$3
N=$4
PROXY_APP=$5
IPV=$3
ID=$4
N=$5
PROXY_APP=$6
###############################################################
# this runs on each peer:
@@ -23,14 +24,14 @@ set +e # circle sigh :(
set -e
# restart peer - should have an empty blockchain
PERSISTENT_PEERS="$(test/p2p/ip_plus_id.sh 1 $DOCKER_IMAGE):26656"
PERSISTENT_PEERS="$(test/p2p/address.sh $IPV 1 26656 $DOCKER_IMAGE)"
for j in `seq 2 $N`; do
PERSISTENT_PEERS="$PERSISTENT_PEERS,$(test/p2p/ip_plus_id.sh $j $DOCKER_IMAGE):26656"
PERSISTENT_PEERS="$PERSISTENT_PEERS,$(test/p2p/address.sh $IPV $j 26656 $DOCKER_IMAGE)"
done
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $ID $PROXY_APP "--p2p.persistent_peers $PERSISTENT_PEERS --p2p.pex --rpc.unsafe"
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $IPV $ID $PROXY_APP "--p2p.persistent_peers $PERSISTENT_PEERS --p2p.pex --rpc.unsafe"
# wait for peer to sync and check the app hash
bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME fs_$ID "test/p2p/fast_sync/check_peer.sh $ID"
bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME $IPV fs_$ID "test/p2p/fast_sync/check_peer.sh $IPV $ID"
echo ""
echo "PASS"