]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add isctest.check.ede() helper for pytest
authorNicki Křížek <nicki@isc.org>
Thu, 30 Oct 2025 17:08:01 +0000 (18:08 +0100)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Nov 2025 14:41:51 +0000 (15:41 +0100)
commit61b3b415d5f19c7e4f2483597d392bace4d4bcfd
treea09715da67f082f8026f4480f81e67ccdf8f9642
parent48deff9faef5554e203b6f452bacbbb70ae03afc
Add isctest.check.ede() helper for pytest

Add a utility function to check for EDE options present in the DNS
message. The primary benefit of this helper function is that it
handles the compatibility issues with different dnspython versions
and the actual test code doesn't have to deal with that any more.

Rather than using the convenience .extended_errors() method
introduced in dnspython 2.7.0, iterate over the options and find
EDEOption types, which is supported from 2.2.0 onwards.

To work around the issue of using dns.edns.EDECode to specify EDE codes
in our tests, create an isctest.compat.EDECode wrapper. This can be used
even with dnspython versions prior to 2.2.0 and will simply result in
no-op, since EDE isn't supported in the older dnspython anyway.
bin/tests/system/isctest/check.py
bin/tests/system/isctest/compat.py