Commit 2c4ebdff authored by Jan Včelák's avatar Jan Včelák 🚀

tests-extra: enable additionals checking for selected tests

The Additional section of the answers should be compared with BIND on
expected delegations.

Knot DNS also puts A/AAAA records into the Additional section for NS,
MX, and SRV records.
parent be03a91d
......@@ -41,7 +41,7 @@ resp.cmp(bind)
# AA flag must be cleared
resp = knot.dig("sub.flags", "NS", flags="AA")
resp.check(flags="QR", noflags="AA TC RD RA AD CD")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# RA flag must be cleared
resp = knot.dig("flags", "NS", flags="RA")
......@@ -51,7 +51,7 @@ resp.cmp(bind)
# NS record for delegated subdomain (not authoritative).
resp = knot.dig("sub.flags", "NS")
resp.check(flags="QR", noflags="AA TC RD RA AD CD")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Glue record for delegated subdomain (not authoritative).
resp = knot.dig("ns.sub.flags", "A")
......
......@@ -34,12 +34,12 @@ resp.cmp(bind)
# B4. Referral to Signed Zone.
resp = knot.dig("mc.a.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B5. Referral to Unsigned Zone.
resp = knot.dig("mc.b.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B6. Wildcard Expansion.
resp = knot.dig("a.z.w.example", "MX", dnssec=True)
......@@ -69,12 +69,12 @@ resp.cmp(bind)
# Wildcard Expansion below delegation point
resp = knot.dig("a.a.example", "A", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Wildcard Expansion below delegation point (no data)
resp = knot.dig("a.a.example", "AAAA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Direct wildcard query (positive)
resp = knot.dig("*.w.example", "MX", dnssec=True)
......@@ -89,12 +89,12 @@ resp.cmp(bind)
# Direct wildcard query below delegation point (positive)
resp = knot.dig("*.a.example", "A", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Direct wildcard query below delegation point (no data)
resp = knot.dig("*.a.example", "AAAA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B8. DS Child Zone No Data Error.
resp = knot.dig("example", "DS", dnssec=True)
......
......@@ -34,12 +34,12 @@ resp.cmp(bind)
# B4. Referral to Signed Zone.
resp = knot.dig("mc.a.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B5. Referral to Unsigned Zone.
resp = knot.dig("mc.b.example", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B6. Wildcard Expansion.
resp = knot.dig("a.z.w.example", "MX", dnssec=True)
......@@ -69,12 +69,12 @@ resp.cmp(bind)
# Wildcard Expansion below delegation point
resp = knot.dig("a.a.example", "A", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Wildcard Expansion below delegation point (no data)
resp = knot.dig("a.a.example", "AAAA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Direct wildcard query (positive)
resp = knot.dig("*.w.example", "MX", dnssec=True)
......@@ -89,12 +89,12 @@ resp.cmp(bind)
# Direct wildcard query below delegation point (positive)
resp = knot.dig("*.a.example", "A", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Direct wildcard query below delegation point (no data)
resp = knot.dig("*.a.example", "AAAA", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B8. DS Child Zone No Data Error.
resp = knot.dig("example", "DS", dnssec=True)
......
......@@ -34,7 +34,7 @@ resp.cmp(bind)
# B3. Referral to an Opt-Out Unsigned Zone.
resp = knot.dig("mc.c.example.", "MX", dnssec=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA", eflags="DO")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# B4. Wildcard Expansion.
resp = knot.dig("a.z.w.example.", "MX", dnssec=True)
......
......@@ -49,12 +49,12 @@ resp.cmp(bind)
# Positive (REFERRAL)
resp = knot.dig("sub.flags", "NS", udp=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA TC AD RA")
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Positive (REFERRAL, below delegation)
resp = knot.dig("ns.sub.flags", "A", udp=True)
resp.check(rcode="NOERROR", flags="QR", noflags="AA TC AD RA")
resp.cmp(bind)
resp.cmp(bind, additional=True)
''' ANY query type. '''
......@@ -68,7 +68,7 @@ resp.cmp(bind)
# ANY to delegation point
resp = knot.dig("sub.flags", "ANY", udp=True)
resp.cmp(bind)
resp.cmp(bind, additional=True)
# ANY to CNAME record
resp = knot.dig("cname.flags", "ANY", udp=True)
......@@ -95,11 +95,11 @@ resp.cmp(bind)
# CNAME leading to delegation
resp = knot.dig("cname-ns.flags", "NS", udp=True)
resp.cmp(bind)
resp.cmp(bind, additional=True)
# CNAME leading below delegation
resp = knot.dig("a.cname-ns.flags", "A", udp=True)
resp.cmp(bind)
resp.cmp(bind, additional=True)
# CNAME leading out
resp = knot.dig("cname-out.flags", "A", udp=True)
......@@ -246,7 +246,7 @@ resp.cmp(bind)
# Wildcard chain to NS
resp = knot.dig("a.wildcard-deleg.flags", "NS", udp=True)
resp.cmp(bind)
resp.cmp(bind, additional=True)
# Wildcard leading out
resp = knot.dig("a.wildcard-out.flags", "A", udp=True)
......
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