2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Rename assert_custom_named_is_alive to named_alive

(cherry picked from commit 38e751d9ac)
This commit is contained in:
Michal Nowak
2025-01-23 15:58:48 +01:00
parent 0d75e15d4d
commit 47d64f944f
3 changed files with 7 additions and 7 deletions

View File

@@ -102,6 +102,12 @@ def is_executable(cmd: str, errmsg: str) -> None:
assert executable is not None, errmsg
def named_alive(named_proc, resolver_ip):
assert named_proc.poll() is None, "named isn't running"
msg = dns.message.make_query("version.bind", "TXT", "CH")
isctest.query.tcp(msg, resolver_ip, expected_rcode=dns_rcode.NOERROR)
def notauth(message: dns.message.Message) -> None:
rcode(message, dns.rcode.NOTAUTH)

View File

@@ -132,9 +132,3 @@ def get_named_cmdline(cfg_dir, cfg_file="named.conf"):
named_cmdline = [named, "-c", cfg_file, "-d", "99", "-g"]
return named_cmdline
def assert_custom_named_is_alive(named_proc, resolver_ip):
assert named_proc.poll() is None, "named isn't running"
msg = dns.message.make_query("version.bind", "TXT", "CH")
isctest.query.tcp(msg, resolver_ip, expected_rcode=dns_rcode.NOERROR)

View File

@@ -177,7 +177,7 @@ def test_named_shutdown(kill_method):
named_cmdline, cwd=cfg_dir, stderr=named_log
) as named_proc:
try:
isctest.run.assert_custom_named_is_alive(named_proc, resolver_ip)
isctest.check.named_alive(named_proc, resolver_ip)
do_work(
named_proc,
resolver_ip,