tendermint/test/p2p/test.sh

37 lines
1.1 KiB
Bash
Raw Normal View History

2016-07-24 11:08:47 -07:00
#! /bin/bash
set -eu
2016-07-24 11:08:47 -07:00
DOCKER_IMAGE=$1
NETWORK_NAME=local_testnet
2016-12-12 13:00:21 -08:00
N=4
PROXY_APP=persistent_dummy
2016-07-24 11:08:47 -07:00
cd $GOPATH/src/github.com/tendermint/tendermint
# stop the existing testnet and remove local network
set +e
bash test/p2p/local_testnet_stop.sh $NETWORK_NAME $N
set -e
2016-07-24 11:08:47 -07:00
# start the testnet on a local network
# NOTE we re-use the same network for all tests
bash test/p2p/local_testnet_start.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP
2016-07-24 11:08:47 -07:00
2016-12-12 13:00:21 -08:00
# test basic connectivity and consensus
# start client container and check the num peers and height for all nodes
bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME basic "test/p2p/basic/test.sh $N"
2016-12-12 13:00:21 -08:00
# test atomic broadcast:
# start client container and test sending a tx to each node
bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME ab "test/p2p/atomic_broadcast/test.sh $N"
# test fast sync (from current state of network):
# for each node, kill it and readd via fast sync
bash test/p2p/fast_sync/test.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP
2016-12-20 13:36:06 -08:00
2017-01-13 07:27:31 -08:00
# test killing all peers 3 times
2016-12-20 13:36:06 -08:00
bash test/p2p/kill_all/test.sh $DOCKER_IMAGE $NETWORK_NAME $N 3
2017-01-13 07:27:31 -08:00
# test pex
bash test/p2p/pex/test.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP