You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

7 years ago
7 years ago
7 years ago
  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=$2
  5. N=$3
  6. PROXY_APP=$4
  7. ID=1
  8. cd $GOPATH/src/github.com/tendermint/tendermint
  9. echo "----------------------------------------------------------------------"
  10. echo "Testing full network connection using one /dial_peers call"
  11. echo "(assuming peers are started with pex enabled)"
  12. # stop the existing testnet and remove local network
  13. set +e
  14. bash test/p2p/local_testnet_stop.sh $NETWORK_NAME $N
  15. set -e
  16. # start the testnet on a local network
  17. # NOTE we re-use the same network for all tests
  18. PERSISTENT_PEERS=""
  19. bash test/p2p/local_testnet_start.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP $PERSISTENT_PEERS
  20. # dial peers from one node
  21. CLIENT_NAME="dial_peers"
  22. bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME $CLIENT_NAME "test/p2p/pex/dial_peers.sh $N"
  23. # test basic connectivity and consensus
  24. # start client container and check the num peers and height for all nodes
  25. CLIENT_NAME="dial_peers_basic"
  26. bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME $CLIENT_NAME "test/p2p/basic/test.sh $N"