]> git.ipfire.org Git - thirdparty/bind9.git/commit
add helper functions to isctest
authorEvan Hunt <each@isc.org>
Thu, 26 Jun 2025 22:19:45 +0000 (15:19 -0700)
committerEvan Hunt <each@isc.org>
Tue, 29 Jul 2025 22:58:11 +0000 (22:58 +0000)
commit2a51b24cb74927b6ea38aeeabbf7c486e0da98cc
tree4808516239e7f9507127f27f643fada24a35bdc0
parent448223b3918ee44cc8f7c56079d5b53239917679
add helper functions to isctest

added some helper functions in isctest to reduce code repetition
in dnssec-related tests:

- isctest.check.adflag() - checks that a response contains AD=1
- isctest.check.noadflag() - checks that a response contains AD=0

- isctest.check.rdflag() - checks that a response contains RD=1
- isctest.check.nordflag() - checks that a response contains RD=0

- isctest.check.answer_count_eq() - checks the answer count is correct
- isctest.check.additional_count_eq() - same for authority count
- isctest.check.authority_count_eq() - same for additional count

- isctest.check.same_data() - check that two message have the
                              same rcode and data
- isctest.check.same_answer() - check that two message have the same
                                rcode and answer

- isctest.dnssec.msg() - a wrapper for dns.message.make_query() that
                         creates a query message similar to dig +dnssec:
                         use_edns=True, want_dnssec=True,
                         and flags are set to (RD|AD) by default, but
                         options exist to disable AD or enable CD.
                         (to generate non-DNSSEC queries, use
                         message.make_query() directly.)

(cherry picked from commit b69097f139154ca0d2177f35632400200d220bdc)
bin/tests/system/isctest/__init__.py
bin/tests/system/isctest/check.py
bin/tests/system/isctest/dnssec.py [new file with mode: 0644]
bin/tests/system/isctest/instance.py