Files
weave/test/400_weave_local_test.sh
T
Michael Bridgen 93f16d91ce Run weave run with the local docker
We want to be compatible with whatever docker the user has; `weave
run` is the only command that passes on arbitrary args to docker
(i.e., that doesn't have a fixed set of docker features that it
needs).

To make this workable we still need to do some things on the remote
host: the IP attachment and figuring out the DNS settings (since those
may depend on the bridge IP).
2015-03-20 14:37:24 +00:00

20 lines
474 B
Bash
Executable File

#!/bin/bash
. ./config.sh
start_suite "Run weave with --local"
run_on $HOST1 sudo ./weave --local reset
run_on $HOST1 sudo ./weave --local launch
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 -i c1 sh -c "ifconfig | grep ethwe")
assert "test -n \"$ok\" && echo pass" "pass"
docker_on $HOST1 rm -f c1 || true
end_suite