[proxy] add --rewrite-inspect flag
To return the weave ip/mac for docker inspect calls.
This commit is contained in:
1 parent
145a527626
commit
e21a204eed
8 files changed
+174
-3
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
start_suite "Check that docker inspect returns the weave IP"
|
||||
|
||||
weave_on $HOST1 launch-router
|
||||
weave_on $HOST1 launch-proxy --rewrite-inspect
|
||||
|
||||
proxy docker_on $HOST1 run -dt --name c1 $SMALL_IMAGE /bin/sh
|
||||
inspect_format="{{.Name}} {{.NetworkSettings.MacAddress}} {{.NetworkSettings.IPAddress}}/{{.NetworkSettings.IPPrefixLen}}"
|
||||
expected="/$(weave_on $HOST1 ps c1)"
|
||||
|
||||
assert "proxy docker_on $HOST1 inspect --format='$inspect_format' c1" "$expected"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user