ZeroTierOne/netcon/docker-test/_two_party_test.sh

16 lines
579 B
Bash
Raw Normal View History

#!/bin/bash
# Runs test image and monitor image as daemons
test_name=${PWD##*/}
2015-12-07 06:37:23 +00:00
echo 'Starting containers for: ' "$test_name"
touch "$test_name".name
test_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest)
monitor_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest)
echo "waiting $netcon_test_wait_time for test to complete."
sleep $netcon_test_wait_time
docker stop $(docker ps -a -q)
docker rm $test_container
2015-12-07 06:37:23 +00:00
docker rm $monitor_container
rm -f *.name