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

+1 -1
View File
@@ -11,7 +11,7 @@ assert_raises "docker_on $HOST1 ps | grep weave" 0
docker_on $HOST1 rm -f c1 || true
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 ubuntu
ok=$(docker -H tcp://$HOST1:2375 exec c1 sh -c "ifconfig | grep ethwe")
ok=$(exec_on $HOST1 c1 ifconfig | grep ethwe)
assert "test -n \"$ok\" && echo pass" "pass"
docker_on $HOST1 rm -f c1 || true