summaryrefslogtreecommitdiff
path: root/docker-test/httpd
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2015-11-19 17:34:56 -0800
committerJoseph Henry <josephjah@gmail.com>2015-11-19 17:34:56 -0800
commit9a25a627bba4a00465a3648b82fc89f61b980ed1 (patch)
tree460a51fdfc8a1a09a3ee59031d939198e73752f6 /docker-test/httpd
parent31bc5e1559848db374d8d9dd039939c802d91649 (diff)
downloadinfinitytier-9a25a627bba4a00465a3648b82fc89f61b980ed1.tar.gz
infinitytier-9a25a627bba4a00465a3648b82fc89f61b980ed1.zip
WIP: Unit tests -- more generalization
Diffstat (limited to 'docker-test/httpd')
-rw-r--r--docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/README.md)0
-rw-r--r--docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_dockerfile)3
-rw-r--r--docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_entrypoint.sh)4
-rw-r--r--docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_dockerfile)4
-rw-r--r--docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_entrypoint.sh)4
-rwxr-xr-xdocker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh (renamed from docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/test.sh)3
6 files changed, 11 insertions, 7 deletions
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/README.md b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md
index 008fcac8..008fcac8 100644
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/README.md
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_dockerfile b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile
index 0543ccdc..208b0ad6 100644
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_dockerfile
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile
@@ -8,7 +8,8 @@ EXPOSE 9993/udp
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD monitor_identity.public /var/lib/zerotier-one/identity.public
ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret
-RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf
+ADD *.conf /var/lib/zerotier-one/networks.d/
+ADD *.conf /
ADD zerotier-one /
ADD zerotier-cli /
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_entrypoint.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh
index 7be99e9a..792be8b2 100644
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/monitor_entrypoint.sh
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh
@@ -2,7 +2,7 @@
# Parameters for test
test_name=httpd_bigfile
-nwid=e5cd7a9e1c5311ab # test network
+nwid=$(ls *.conf) # test network (assume *.conf file in root directory is where we want to test)
netcon_wait_time=45 # wait for test container to come online
app_timeout_time=10 # app-specific timeout
file_path=/opt/results/ # test result output file path (fs shared between host and containers)
@@ -37,7 +37,7 @@ while [ -z "$virtip4" ]; do
done
echo '*** Starting Test...'
-echo '*** Up and running at' $virtip4
+echo '*** Up and running at' $virtip4 ' on network: ' $nwid
echo '*** Sleeping for 30s while we wait for the Network Container to come online...'
sleep "$netcon_wait_time"s
ncvirtip=$(<$address_file)
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_dockerfile b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile
index 20ce9bf1..8aee457a 100644
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_dockerfile
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile
@@ -21,7 +21,9 @@ RUN /usr/bin/install -c intercept /usr/bin
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD netcon_identity.public /var/lib/zerotier-one/identity.public
ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret
-RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf
+ADD *.conf /var/lib/zerotier-one/networks.d/
+ADD *.conf /
+
ADD zerotier-one /
ADD zerotier-cli /
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_entrypoint.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh
index 82e8ae51..c2158b7c 100644
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/netcon_entrypoint.sh
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh
@@ -2,7 +2,7 @@
# Parameters for test
test_name=httpd_bigfile
-nwid=e5cd7a9e1c5311ab # test network
+nwid=$(ls *.conf) # test network
file_path=/opt/results/ # test result output file path (fs shared between host and containers)
file_base="$test_name".txt # test result output file
address_file="$file_path$test_name"_addr.txt # file shared between host and containers for sharing address (optional)
@@ -31,7 +31,7 @@ while [ -z "$virtip4" ]; do
virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1`
done
-echo '*** Up and running at' $virtip4
+echo '*** Up and running at' $virtip4 ' on network: ' $nwid
echo $virtip4 > "$address_file"
# Generate large random file for transfer test
diff --git a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/test.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh
index 48b87676..f80c97a8 100755
--- a/docker-test/httpd/httpd_2.4.16-1.fc23.x86_64/test.sh
+++ b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh
@@ -3,6 +3,7 @@ testname=${PWD##*/}
echo 'Building dockerfiles for test: ' "$testname"
# 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 ../../intercept intercept
@@ -13,7 +14,6 @@ cp ../../netcon_identity.secret netcon_identity.secret
cp ../../monitor_identity.public monitor_identity.public
cp ../../monitor_identity.secret monitor_identity.secret
-
docker build --tag="$testname" -f netcon_dockerfile .
docker build --tag="$testname"_monitor -f monitor_dockerfile .
@@ -26,6 +26,7 @@ rm -f netcon_identity.public
rm -f netcon_identity.secret
rm -f monitor_identity.public
rm -f monitor_identity.secret
+rm -f *.conf
# Start netcon container to be tested
docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$testname":latest