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
895 B

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=local_testnet
  5. cd $GOPATH/src/github.com/tendermint/tendermint
  6. # start the testnet on a local network
  7. bash test/p2p/local_testnet.sh $DOCKER_IMAGE $NETWORK_NAME
  8. # test atomic broadcast
  9. bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME ab test/p2p/atomic_broadcast/test.sh
  10. # test fast sync (from current state of network)
  11. # run it on each of them
  12. N=4
  13. for i in `seq 1 $N`; do
  14. echo "Testing fasysync on node $i"
  15. # kill peer
  16. set +e # circle sigh :(
  17. docker rm -vf local_testnet_$i
  18. set -e
  19. # restart peer - should have an empty blockchain
  20. SEEDS="$(test/p2p/ip.sh 1):46656"
  21. for j in `seq 2 $N`; do
  22. SEEDS="$SEEDS,$(test/p2p/ip.sh $j):46656"
  23. done
  24. bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $i $SEEDS
  25. bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME fs_$i "test/p2p/fast_sync/test.sh $i"
  26. done
  27. echo ""
  28. echo "PASS"
  29. echo ""