Files
weave/test/250_dns_negative_test.sh
T
2015-09-30 22:57:10 +01:00

17 lines
489 B
Bash
Executable File

#! /bin/bash
. ./config.sh
start_suite "Negative DNS queries"
weave_on $HOST1 launch
start_container_with_dns $HOST1 --name c1
# unsupported query types, unknown names, and unknown domains should
# all trigger NXDOMAIN
assert_raises "exec_on $HOST1 c1 dig MX c1.weave.local | grep -q 'status: NXDOMAIN'"
assert_raises "exec_on $HOST1 c1 dig A xx.weave.local | grep -q 'status: NXDOMAIN'"
assert_raises "exec_on $HOST1 c1 dig A xx.invalid | grep -q 'status: NXDOMAIN'"
end_suite