Return NOTIMP for some unimplemented query types, NXDOMAIN otherwise
This commit is contained in:
1 parent
56038674b1
commit
ba98135e03
5 files changed
+18
-11
No files matched your search
@@ -15,4 +15,7 @@ weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/s
|
||||
|
||||
assert_dns_record $HOST1 c1 $NAME $C2
|
||||
|
||||
assert_dns_status $HOST1 c1 "MX seetwo.weave.local" NXDOMAIN
|
||||
assert_dns_status $HOST1 c1 "AAAA seetwo.weave.local" NXDOMAIN
|
||||
|
||||
end_suite
|
||||
@@ -88,6 +88,18 @@ exec_on() {
|
||||
docker -H tcp://$host:2375 exec $container "$@"
|
||||
}
|
||||
|
||||
dig_on() {
|
||||
host=$1
|
||||
cont=$2
|
||||
query=$3
|
||||
docker -H tcp://$host:2375 exec $cont sh -c "dig $query"
|
||||
}
|
||||
|
||||
# assert_dns_status <host> <container> <name> <query> <status>
|
||||
assert_dns_status() {
|
||||
assert_raises "dig_on \"$1\" \"$2\" \"$3\" | grep -q \"status: $4\""
|
||||
}
|
||||
|
||||
# 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