extract helper for obtaining container ip address
thus keeping the ghastly regexp in one place instead of three.
This commit is contained in:
1 parent
bb8a745431
commit
2647fd4c92
4 files changed
+7
-3
No files matched your search
@@ -88,6 +88,10 @@ exec_on() {
|
||||
docker -H tcp://$host:2375 exec $container $@
|
||||
}
|
||||
|
||||
container_ip() {
|
||||
weave_on $1 ps $2 | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
|
||||
}
|
||||
|
||||
# assert_dns_record <host> <container> <name> <ip>
|
||||
assert_dns_record() {
|
||||
assert "exec_on $1 $2 getent hosts $3 | tr -s ' '" "$4 $3"
|
||||
|
||||
Reference in new issue
Block a user