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.

38 lines
1.3 KiB

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=local_testnet
  5. N=4
  6. PROXY_APP=persistent_dummy
  7. cd "$GOPATH/src/github.com/tendermint/tendermint"
  8. # stop the existing testnet and remove local network
  9. set +e
  10. bash test/p2p/local_testnet_stop.sh "$NETWORK_NAME" "$N"
  11. set -e
  12. PERSISTENT_PEERS=$(bash test/p2p/persistent_peers.sh $N)
  13. # start the testnet on a local network
  14. # NOTE we re-use the same network for all tests
  15. bash test/p2p/local_testnet_start.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$N" "$PROXY_APP" "$PERSISTENT_PEERS"
  16. # test basic connectivity and consensus
  17. # start client container and check the num peers and height for all nodes
  18. bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" basic "test/p2p/basic/test.sh $N"
  19. # test atomic broadcast:
  20. # start client container and test sending a tx to each node
  21. bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" ab "test/p2p/atomic_broadcast/test.sh $N"
  22. # test fast sync (from current state of network):
  23. # for each node, kill it and readd via fast sync
  24. bash test/p2p/fast_sync/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$N" "$PROXY_APP"
  25. # test killing all peers 3 times
  26. bash test/p2p/kill_all/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$N" 3
  27. # test pex
  28. bash test/p2p/pex/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$N" "$PROXY_APP"