summaryrefslogtreecommitdiff
path: root/netcon/docker-test/_two_party_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'netcon/docker-test/_two_party_test.sh')
-rwxr-xr-xnetcon/docker-test/_two_party_test.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/netcon/docker-test/_two_party_test.sh b/netcon/docker-test/_two_party_test.sh
new file mode 100755
index 00000000..8fa3b3eb
--- /dev/null
+++ b/netcon/docker-test/_two_party_test.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Runs test image and monitor image as daemons
+test_name=${PWD##*/}
+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
+docker rm $monitor_container
+
+rm -f *.name \ No newline at end of file