add test for proxy against docker on non-standard unix socket
Means we need to rebuild the gce images (also small improvement re tmpdir)
This commit is contained in:
1 parent
a4ef96690e
commit
88fad251aa
3 files changed
+11
-6
No files matched your search
@@ -5,7 +5,7 @@
|
||||
start_suite "Various launch-proxy configurations"
|
||||
|
||||
# Booting it over unix socket listens on unix socket
|
||||
run_on $HOST1 COVERAGE=$COVERAGE sudo -E weave launch-proxy
|
||||
run_on $HOST1 COVERAGE=$COVERAGE weave launch-proxy
|
||||
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps"
|
||||
assert_raises "proxy docker_on $HOST1 ps" 1
|
||||
weave_on $HOST1 stop-proxy
|
||||
@@ -17,17 +17,22 @@ assert_raises "proxy docker_on $HOST1 ps"
|
||||
weave_on $HOST1 stop-proxy
|
||||
|
||||
# Booting it over tcp (no prefix) listens on tcp
|
||||
DOCKER_CLIENT_ARGS="-H $HOST1:$DOCKER_PORT" $WEAVE launch-proxy
|
||||
DOCKER_HOST=tcp://$HOST1:$DOCKER_PORT $WEAVE launch-proxy
|
||||
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" 1
|
||||
assert_raises "proxy docker_on $HOST1 ps"
|
||||
weave_on $HOST1 stop-proxy
|
||||
|
||||
# Booting it with -H outside /var/run/weave, still works
|
||||
socket="$(mktemp -d)/weave.sock"
|
||||
socket="$($SSH $HOST1 mktemp -d)/weave.sock"
|
||||
weave_on $HOST1 launch-proxy -H unix://$socket
|
||||
assert_raises "run_on $HOST1 sudo docker -H unix:///$socket ps" 0
|
||||
weave_on $HOST1 stop-proxy
|
||||
|
||||
# Booting it against non-standard docker unix sock
|
||||
run_on $HOST1 "DOCKER_HOST=unix:///var/run/alt-docker.sock COVERAGE=$COVERAGE weave launch-proxy -H tcp://0.0.0.0:12375"
|
||||
assert_raises "proxy docker_on $HOST1 ps"
|
||||
weave_on $HOST1 stop-proxy
|
||||
|
||||
# Booting it over tls errors
|
||||
assert_raises "DOCKER_CLIENT_ARGS='--tls' weave_on $HOST1 launch-proxy" 1
|
||||
assert_raises "DOCKER_CERT_PATH='./tls' DOCKER_TLS_VERIFY=1 weave_on $HOST1 launch-proxy" 1
|
||||
|
||||
Reference in new issue
Block a user