Browse Source

test: more unique container names

pull/343/head
Ethan Buchman 8 years ago
parent
commit
bd222d6e3c
2 changed files with 7 additions and 6 deletions
  1. +3
    -2
      test/p2p/client.sh
  2. +4
    -4
      test/p2p/kill_all/test.sh

+ 3
- 2
test/p2p/client.sh 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

+ 4
- 4
test/p2p/kill_all/test.sh 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 ""


Loading…
Cancel
Save