1 parent
39e7871cf7
commit
9bd695a816
2 files changed
+10
-9
No files matched your search
+2
-2
@@ -33,8 +33,8 @@ to run everything named `*_test.sh`.
|
|||||||
|
|
||||||
By default the tests assume the Vagrant VMs are used.
|
By default the tests assume the Vagrant VMs are used.
|
||||||
|
|
||||||
To use other VMs, set the environment variables <var>HOST1</var> and
|
To use other VMs, set the environment variable <var>HOSTS</var> to the
|
||||||
<var>HOST2</var> to the IP addresses of two docker hosts, and set the
|
space-separated list of IP addresses of the docker hosts, and set the
|
||||||
environment variable <var>SSH</var> to a command that will log into
|
environment variable <var>SSH</var> to a command that will log into
|
||||||
either (which may just be `ssh`).
|
either (which may just be `ssh`).
|
||||||
|
|
||||||
|
|||||||
+8
-7
@@ -7,15 +7,16 @@ N_MACHINES=${N_MACHINES:-2}
|
|||||||
IP_PREFIX=${IP_PREFIX:-192.168.48}
|
IP_PREFIX=${IP_PREFIX:-192.168.48}
|
||||||
IP_SUFFIX_BASE=${IP_SUFFIX_BASE:-10}
|
IP_SUFFIX_BASE=${IP_SUFFIX_BASE:-10}
|
||||||
|
|
||||||
HOSTS=
|
if [ -z "$HOSTS" ] ; then
|
||||||
for i in $(seq 1 $N_MACHINES); do
|
for i in $(seq 1 $N_MACHINES); do
|
||||||
IP="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+$i))"
|
IP="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+$i))"
|
||||||
HOSTS="$HOSTS $IP"
|
HOSTS="$HOSTS $IP"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# these are used by the tests
|
# these are used by the tests
|
||||||
HOST1="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+1))"
|
HOST1=$(echo $HOSTS | cut -f 1 -d ' ')
|
||||||
HOST2="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+2))"
|
HOST2=$(echo $HOSTS | cut -f 2 -d ' ')
|
||||||
|
|
||||||
. ./assert.sh
|
. ./assert.sh
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user