This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[proxy] Choose where to listen based on how launching client connected
- Loading branch information
1 parent
52d3bcf
commit f9e8bef
Showing
4 changed files
with
92 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
start_suite "Boot the proxy should only listen on client's interface" | ||
|
||
# Booting it over unix socket listens on unix socket | ||
run_on $HOST1 sudo weave launch-proxy | ||
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave.sock ps" | ||
assert_raises "proxy docker_on $HOST1 ps" 1 | ||
weave_on $HOST1 stop-proxy | ||
|
||
# Booting it over tcp listens on tcp | ||
weave_on $HOST1 launch-proxy | ||
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave.sock ps" 1 | ||
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 | ||
|
||
# Booting it with a specific -H overrides defaults | ||
weave_on $HOST1 launch-proxy -H unix:///var/run/weave2.sock | ||
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave2.sock ps" | ||
assert_raises "proxy docker_on $HOST1 ps" 1 | ||
weave_on $HOST1 stop-proxy | ||
|
||
end_suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters