simplify dns tests

- use 'host' to lookup MX record. It's shorter
- use getent everywhere else for dns lookups, instead of dig; this
  tests more of the o/s name resolution machinery and is generally
  shorter.
- introduce assert_dns_record helper that performs forward and reverse
- lookup introduce some vars for holding constants, so we don't have
  to repeat them
This commit is contained in:
Matthias Radestock committed 2015-04-22 19:38:04 +01:00
1 parent 5749d19fee
commit eebb674232
5 files changed
+25 -25

No files matched your search

+8
View File
@@ -88,6 +88,14 @@ exec_on() {
docker -H tcp://$host:2375 exec $container "$@"
}
# assert_dns_record <host> <container> <name> <ip>
assert_dns_record() {
ok=$(exec_on $1 $2 getent hosts $3)
assert "echo $ok" "$4 $3"
ok=$(exec_on $1 $2 getent hosts $4)
assert "echo $ok" "$4 $3"
}
start_suite() {
whitely echo $@
}