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.
|
||||
|
||||
To use other VMs, set the environment variables <var>HOST1</var> and
|
||||
<var>HOST2</var> to the IP addresses of two docker hosts, and set the
|
||||
To use other VMs, set the environment variable <var>HOSTS</var> to 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
|
||||
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_SUFFIX_BASE=${IP_SUFFIX_BASE:-10}
|
||||
|
||||
HOSTS=
|
||||
for i in $(seq 1 $N_MACHINES); do
|
||||
IP="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+$i))"
|
||||
HOSTS="$HOSTS $IP"
|
||||
done
|
||||
if [ -z "$HOSTS" ] ; then
|
||||
for i in $(seq 1 $N_MACHINES); do
|
||||
IP="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+$i))"
|
||||
HOSTS="$HOSTS $IP"
|
||||
done
|
||||
fi
|
||||
|
||||
# these are used by the tests
|
||||
HOST1="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+1))"
|
||||
HOST2="${IP_PREFIX}.$((${IP_SUFFIX_BASE}+2))"
|
||||
HOST1=$(echo $HOSTS | cut -f 1 -d ' ')
|
||||
HOST2=$(echo $HOSTS | cut -f 2 -d ' ')
|
||||
|
||||
. ./assert.sh
|
||||
|
||||
|
||||
Reference in new issue
Block a user