add exec_on helper

so we don't repeat the remote docker invocation command (complete with
hard-coded port) over and over again.
This commit is contained in:
Matthias Radestock committed 2015-04-22 09:25:42 +01:00
1 parent 3ad186d727
commit a7c9fd272c
8 files changed
+19 -12

No files matched your search

+2 -2
View File
@@ -16,10 +16,10 @@ docker_on $HOST1 rm -f c1 c2 || true
weave_on $HOST1 run $C2/24 -t --name=c2 -h seetwo.weave.local ubuntu
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
ok=$(docker -H tcp://$HOST1:2375 exec c1 sh -c "dig +short seetwo.weave.local")
ok=$(exec_on $HOST1 c1 dig +short seetwo.weave.local)
assert "echo $ok" "$C2"
ok=$(docker -H tcp://$HOST1:2375 exec c1 sh -c "dig +short -x $C2")
ok=$(exec_on $HOST1 c1 dig +short -x $C2)
assert "echo $ok" "seetwo.weave.local."
end_suite