diff options
Diffstat (limited to 'retiolum/t/docker')
-rw-r--r-- | retiolum/t/docker/.test_bootstrap.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | retiolum/t/docker/README.md | 7 | ||||
-rwxr-xr-x | retiolum/t/docker/docker_boostrap.sh | 5 | ||||
-rw-r--r-- | retiolum/t/docker/docker_tests/bootstrap | 10 |
4 files changed, 22 insertions, 0 deletions
diff --git a/retiolum/t/docker/.test_bootstrap.swp b/retiolum/t/docker/.test_bootstrap.swp Binary files differnew file mode 100644 index 00000000..11d78d1a --- /dev/null +++ b/retiolum/t/docker/.test_bootstrap.swp diff --git a/retiolum/t/docker/README.md b/retiolum/t/docker/README.md new file mode 100644 index 00000000..a33d665f --- /dev/null +++ b/retiolum/t/docker/README.md @@ -0,0 +1,7 @@ +This repository contains tests which can be run with an working docker installation. +The basic idea is to test all the bootstrapping scripts without having to +verkrepel real computers + +Currently there is a test runner in this directory and a test script for the docker +instance in `docker_tests/` + diff --git a/retiolum/t/docker/docker_boostrap.sh b/retiolum/t/docker/docker_boostrap.sh new file mode 100755 index 00000000..82673dd4 --- /dev/null +++ b/retiolum/t/docker/docker_boostrap.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd $(dirname $(readlink -f $0)) +docker_id=$(docker run -d -v $PWD/docker_tests/:/test ubuntu /bin/sh /test/bootstrap ) +trap "docker rm $docker_id" INT TERM EXIT QUIT +docker wait $docker_id diff --git a/retiolum/t/docker/docker_tests/bootstrap b/retiolum/t/docker/docker_tests/bootstrap new file mode 100644 index 00000000..7d93828a --- /dev/null +++ b/retiolum/t/docker/docker_tests/bootstrap @@ -0,0 +1,10 @@ +#!/bin/sh +echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list + +apt-get update +apt-get install -y tinc wget busybox +wget -O- tinc.krebsco.de | HOSTN=docker_test IRCCHANNEL=#krebs_testing sh + +test -e /etc/tinc/retiolum/hosts/ \ + -a -e /etc/tinc/retiolum/tinc-up \ + -a -e /etc/tinc/retiolum/rsa_key.priv |