diff options
author | Joseph Henry <josephjah@gmail.com> | 2015-12-03 18:50:20 -0800 |
---|---|---|
committer | Joseph Henry <josephjah@gmail.com> | 2015-12-03 18:50:20 -0800 |
commit | 2196d982c374231e09f41d23cc32932391036ee8 (patch) | |
tree | d38df4d0ee567bfe12b6e949af1c2923260370f7 /netcon/docker-test | |
parent | 5c5943a00c38f2540c6d30616e1b48222d1fa6c2 (diff) | |
download | infinitytier-2196d982c374231e09f41d23cc32932391036ee8.tar.gz infinitytier-2196d982c374231e09f41d23cc32932391036ee8.zip |
(fixed) nwid detection in test script
Diffstat (limited to 'netcon/docker-test')
13 files changed, 24 insertions, 52 deletions
diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh index 9e8f7253..52470efd 100644 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh +++ b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh @@ -8,8 +8,8 @@ test_namefile=$(ls *.name) test_name="${test_namefile%.*}" # test network id nwconf=$(ls *.conf) # blank test network config file nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout +netcon_wait_time=35 # wait for test container to come online +app_timeout_time=25 # app-specific timeout file_path=/opt/results/ # test result output file path (fs shared between host and containers) file_base="$test_name".txt # test result output file fail=FAIL. # appended to result file in event of failure diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh index 37277d53..1c5dcbd1 100644 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh @@ -16,7 +16,6 @@ bigfile_name=bigfile bigfile_size=10M # size of file we want to use for the test tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - # --- Network Config --- echo '*** ZeroTier Network Containers Test: ' "$test_name" chown -R daemon /var/lib/zerotier-one @@ -26,11 +25,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid +echo '--- Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- # Generate large random file for transfer test, share md5sum for monitor container to check diff --git a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh index 9e8f7253..52470efd 100644 --- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh +++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh @@ -8,8 +8,8 @@ test_namefile=$(ls *.name) test_name="${test_namefile%.*}" # test network id nwconf=$(ls *.conf) # blank test network config file nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout +netcon_wait_time=35 # wait for test container to come online +app_timeout_time=25 # app-specific timeout file_path=/opt/results/ # test result output file path (fs shared between host and containers) file_base="$test_name".txt # test result output file fail=FAIL. # appended to result file in event of failure diff --git a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh index 37277d53..44f8db12 100644 --- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh @@ -26,11 +26,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- # Generate large random file for transfer test, share md5sum for monitor container to check diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh index 9e8f7253..52470efd 100644 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh +++ b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh @@ -8,8 +8,8 @@ test_namefile=$(ls *.name) test_name="${test_namefile%.*}" # test network id nwconf=$(ls *.conf) # blank test network config file nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout +netcon_wait_time=35 # wait for test container to come online +app_timeout_time=25 # app-specific timeout file_path=/opt/results/ # test result output file path (fs shared between host and containers) file_base="$test_name".txt # test result output file fail=FAIL. # appended to result file in event of failure diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh index d1138111..bf249222 100644 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh @@ -26,11 +26,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- # Generate large random file for transfer test, share md5sum for monitor container to check diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh index 9e8f7253..52470efd 100644 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh +++ b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh @@ -8,8 +8,8 @@ test_namefile=$(ls *.name) test_name="${test_namefile%.*}" # test network id nwconf=$(ls *.conf) # blank test network config file nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout +netcon_wait_time=35 # wait for test container to come online +app_timeout_time=25 # app-specific timeout file_path=/opt/results/ # test result output file path (fs shared between host and containers) file_base="$test_name".txt # test result output file fail=FAIL. # appended to result file in event of failure diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh index d1138111..bf249222 100644 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh @@ -26,11 +26,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- # Generate large random file for transfer test, share md5sum for monitor container to check diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh index a6aadb9f..a6e1b6c1 100644 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh +++ b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh @@ -23,11 +23,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- echo '*** Starting application...' diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh index ff5b4259..8f7aefec 100644 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh @@ -23,11 +23,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- echo '*** Starting application...' diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh index a8784d5c..9d8625aa 100644 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh +++ b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh @@ -26,11 +26,13 @@ virtip4="" while [ -z "$virtip4" ]; do sleep 0.2 virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` + dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` done echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Writing address to ' "$address_file" echo $virtip4 > "$address_file" +export ZT_NC_NWID=$dev # --- Test section --- # Generate large random file for transfer test, share md5sum for monitor container to check diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/two_party_test.sh b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/two_party_test.sh deleted file mode 100755 index b054b34b..00000000 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/two_party_test.sh +++ /dev/null @@ -1,41 +0,0 @@ - -test_name=${PWD##*/} -echo 'Building dockerfiles for test: ' "$test_name" -touch "$test_name".name - -# Docker won't allow the inclusion of files outside of the build directory -cp ../../*.conf . -cp ../../zerotier-one zerotier-one -cp ../../zerotier-cli zerotier-cli -cp ../../zerotier-intercept zerotier-intercept -cp ../../libzerotierintercept.so.1.0 libzerotierintercept.so.1.0 -cp ../../liblwip.so liblwip.so -cp ../../netcon_identity.public netcon_identity.public -cp ../../netcon_identity.secret netcon_identity.secret -cp ../../monitor_identity.public monitor_identity.public -cp ../../monitor_identity.secret monitor_identity.secret - -docker build --tag="$test_name" -f netcon_dockerfile . -docker build --tag="$test_name"_monitor -f monitor_dockerfile . - -rm -f zerotier-one -rm -f zerotier-cli -rm -f zerotier-intercept -rm -f libzerotierintercept.so.1.0 -rm -f liblwip.so -rm -f netcon_identity.public -rm -f netcon_identity.secret -rm -f monitor_identity.public -rm -f monitor_identity.secret -rm -f *.conf -rm -f *.name - -# Start netcon container to be tested -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 kill $(docker ps -a -q) -docker rm $test_container -docker rm $monitor_container
\ No newline at end of file diff --git a/netcon/docker-test/test.sh b/netcon/docker-test/test.sh index 9f232ca8..34bc0796 100755 --- a/netcon/docker-test/test.sh +++ b/netcon/docker-test/test.sh @@ -4,7 +4,7 @@ rm _results/*.txt # How long we shall wait for each test to conclude -export netcon_test_wait_time=45s +export netcon_test_wait_time=60s # Test structure, in later releases more complex multi-party scripts will be included export testscript=two_party_test.sh |