Commit 5aafc316 authored by Marek Vavrusa's avatar Marek Vavrusa

tests-extra: added NSEC/NSEC3 tests for wildcard expansions

- new test for wildcard expansion leading to NXDOMAIN
- new test for wildcard expansion leading to NODATA
parent 50303d2f
......@@ -24,3 +24,4 @@ xx.example. 3600 IN HINFO "KLH-10" "TOPS-20"
xx.example. 3600 IN AAAA 2001:db8::f00:baaa
x.w.example. 3600 IN MX 1 xx.example.
*.to-apex.example. 3600 IN CNAME example. ; Wildcard expansion leading to apex
*.to-nxdomain.example. 3600 IN CNAME nxdomain.example. ; Wildcard expansion leading to nonexistent name
......@@ -56,6 +56,16 @@ resp = knot.dig("a.to-apex.example", "SOA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
resp.cmp(bind)
# Wildcard Expansion to apex (nodata)
resp = knot.dig("a.to-apex.example", "TXT", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
resp.cmp(bind)
# Wildcard Expansion to non-existent name
resp = knot.dig("a.to-nxdomain.example", "A", dnssec=True)
resp.check(rcode="NXDOMAIN", flags="QR AA", eflags="DO")
resp.cmp(bind)
# B9. Direct wildcard query (positive)
resp = knot.dig("*.w.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
......
......@@ -56,6 +56,16 @@ resp = knot.dig("a.to-apex.example", "SOA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
resp.cmp(bind)
# Wildcard Expansion to apex (NODATA)
resp = knot.dig("a.to-apex.example", "TXT", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
resp.cmp(bind)
# Wildcard Expansion to non-existent name
resp = knot.dig("a.to-nxdomain.example", "A", bufsize=1600, dnssec=True)
resp.check(rcode="NXDOMAIN", flags="QR AA", eflags="DO")
resp.cmp(bind)
# B9. Direct wildcard query (positive)
resp = knot.dig("*.w.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR AA", eflags="DO")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment