-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_vagrant_integration_tests.sh
executable file
·53 lines (44 loc) · 1.43 KB
/
run_vagrant_integration_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# fail if anything fails.
set -e
function usage() {
echo "Usage:"
echo ""
echo " $0 -h"
echo " show this message"
echo ""
echo " $0"
echo " run tests and clean up vagrant environment at the end"
echo ""
echo " $0 --keep"
echo " run tests and keep vagrant environment at the end"
}
if [ "$1" == "-h" ] || [ "$1" == "-?" ] || [ "$1" == "--help" ]; then
usage
exit 0
elif [ "$1" == "--keep" ] ; then
keep_virts=yes
elif [ "$1" != "" ] ; then
echo "Unrecognized option: $1"
usage
exit 1
else
keep_virts=no
fi
echo "--------- Bringing up vagrant boxes"
vagrant up
# Current version of docker-rotate library no longer supports Docker 1.5.0, otherwise
# we'd want to test there too.
echo "--------- Running tests on docker 1.9"
vagrant ssh vagrant-test-docker19 -c 'DOCKER_PY_VERSION="==1.7.0" /source/vagrant/test.sh'
echo "--------- Running tests on docker 1.11"
vagrant ssh vagrant-test-docker111 -c 'DOCKER_PY_VERSION="==1.9.0" /source/vagrant/test.sh'
echo "--------- Running tests on docker 1.12"
vagrant ssh vagrant-test-docker112 -c 'DOCKER_PY_VERSION="==1.9.0" /source/vagrant/test.sh'
if [ "$keep_virts" == "yes" ] ; then
echo "--------- all tests complete, skipping vagrant env cleanup"
echo "to clean up the VMs, run \"vagrant destroy\" from this directory."
else
echo "--------- all tests complete, tearing down vagrant env"
vagrant destroy -f
fi