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:
@@ -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)
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user