test: more unique container names

This commit is contained in:
Ethan Buchman 2016-12-22 20:50:13 -05:00
parent 0c01b0ded9
commit bd222d6e3c
2 changed files with 7 additions and 6 deletions

View File

@ -6,13 +6,14 @@ NETWORK_NAME=$2
ID=$3
CMD=$4
NAME=test_container_$ID
echo "starting test client container with CMD=$CMD"
# run the test container on the local network
docker run -t --rm \
-v $GOPATH/src/github.com/tendermint/tendermint/test/p2p/:/go/src/github.com/tendermint/tendermint/test/p2p \
--net=$NETWORK_NAME \
--ip=$(test/p2p/ip.sh "-1") \
--name test_container_$ID \
--name $NAME \
--entrypoint bash \
$DOCKER_IMAGE $CMD

View File

@ -19,12 +19,12 @@ for i in $(seq 1 "$NUM_OF_CRASHES"); do
echo "Restarting all peers! Take $i ..."
# restart all peers
for i in $(seq 1 "$NUM_OF_PEERS"); do
docker stop "local_testnet_$i"
docker start "local_testnet_$i"
for j in $(seq 1 "$NUM_OF_PEERS"); do
docker stop "local_testnet_$j"
docker start "local_testnet_$j"
done
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" kill_all "test/p2p/kill_all/check_peers.sh $NUM_OF_PEERS"
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" kill_all_$i "test/p2p/kill_all/check_peers.sh $NUM_OF_PEERS"
done
echo ""