Files
weave/test/110_encryption_test.sh
T
Matthias Radestock a7c9fd272c add exec_on helper
so we don't repeat the remote docker invocation command (complete with
hard-coded port) over and over again.
2015-04-22 09:25:42 +01:00

25 lines
543 B
Bash
Executable File

#!/bin/bash
. ./config.sh
C1=10.2.1.4
C2=10.2.1.7
start_suite "Ping over encrypted cross-host weave network"
for HOST in $HOST1 $HOST2; do
weave_on $HOST stop || true
weave_on $HOST stop-dns || true
docker_on $HOST rm -f c1 c2 || true
done
weave_on $HOST1 launch -password notverysecure
weave_on $HOST2 launch -password notverysecure $HOST1
weave_on $HOST2 run $C2/24 -t --name=c2 ubuntu
weave_on $HOST1 run $C1/24 -t --name=c1 ubuntu
ok=$(exec_on $HOST1 c1 ping -q -c 4 $C2 >&2 && echo ok)
assert "echo $ok" "ok"
end_suite