]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add isctest.transfer.transfer_message() helper and convert tests 11796/head
authorMichal Nowak <mnowak@isc.org>
Mon, 11 May 2026 11:24:22 +0000 (13:24 +0200)
committerMichal Nowak <mnowak@isc.org>
Mon, 11 May 2026 13:31:41 +0000 (15:31 +0200)
commit27ee27d4e3b508f75169e61baad11adc1175cf05
tree93cf6ea3e2df5263af2628e2074f99d12deca260
parentf65c5b0ab6b0ee8c1b677675d327d5294f1262ec
Add isctest.transfer.transfer_message() helper and convert tests

Add a new helper function, isctest.transfer.transfer_message(), to
bin/tests/system/isctest/transfer.py that generates the log message
produced by xfrin_log() in lib/dns/xfrin.c for an incoming zone
transfer:

    transfer of '<zone>/IN' from <source_ns>#<port>: <msg>

The helper always returns a compiled re.Pattern.  source_ns and port
each accept None to match any source address / port.  msg accepts
either a plain str (regex-escaped automatically) or a compiled
re.Pattern (spliced into the regex as-is), so callers that need regex
syntax in the message part can pass Re(r"...") without having to
wrap the whole result.

source_ns is passed through re.escape() when provided, so dots in
IPv4 addresses (e.g. "10.53.0.1") match a literal dot rather than
any character.

Convert the existing call sites across the system tests to use the
new helper.

Co-Authored-By: Nicki Křížek <nicki@isc.org>
Assisted-by: Claude:claude-sonnet-4-6
Assisted-by: Claude:claude-opus-4-7
bin/tests/system/cipher_suites/tests_cipher_suites.py
bin/tests/system/ede24/common.py
bin/tests/system/ede24/tests_ede24_expired.py
bin/tests/system/ede24/tests_ede24_noloaded.py
bin/tests/system/isctest/__init__.py
bin/tests/system/isctest/transfer.py [new file with mode: 0644]
bin/tests/system/mirror_root_zone/tests_mirror_root_zone.py
bin/tests/system/xfer/tests_retransfer_with_force.py
bin/tests/system/xfer/tests_xfer.py
bin/tests/system/xfer_servers_list/tests_xfer_servers_list.py
bin/tests/system/xferquota/tests_xferquota.py