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

Rename kasp function to check_*

If a function is expected to assert / raise on failure (rather than
return boolean), its name should start with "check_".

(cherry picked from commit 67957d1f54)
This commit is contained in:
Nicki Křížek
2024-10-08 14:09:05 +02:00
committed by Matthijs Mekking
parent f5adeb6800
commit e806d8c6f5
2 changed files with 12 additions and 12 deletions

View File

@@ -232,7 +232,7 @@ class Key:
return self.path return self.path
def zone_is_signed(server, zone): def check_zone_is_signed(server, zone):
addr = server.ip addr = server.ip
fqdn = f"{zone}." fqdn = f"{zone}."
@@ -283,7 +283,7 @@ def zone_is_signed(server, zone):
assert signed assert signed
def dnssec_verify(server, zone): def check_dnssec_verify(server, zone):
# Check if zone if DNSSEC valid with dnssec-verify. # Check if zone if DNSSEC valid with dnssec-verify.
fqdn = f"{zone}." fqdn = f"{zone}."
transfer = _query(server, fqdn, dns.rdatatype.AXFR) transfer = _query(server, fqdn, dns.rdatatype.AXFR)

View File

@@ -584,9 +584,9 @@ def test_ksr_common(servers):
# - check rndc dnssec -status output # - check rndc dnssec -status output
isctest.kasp.check_dnssecstatus(ns1, zone, overlapping_zsks, policy=policy) isctest.kasp.check_dnssecstatus(ns1, zone, overlapping_zsks, policy=policy)
# - zone is signed # - zone is signed
isctest.kasp.zone_is_signed(ns1, zone) isctest.kasp.check_zone_is_signed(ns1, zone)
# - dnssec_verify # - dnssec_verify
isctest.kasp.dnssec_verify(ns1, zone) isctest.kasp.check_dnssec_verify(ns1, zone)
# - check keys # - check keys
check_keys(overlapping_zsks, lifetime, alg, size, with_state=True) check_keys(overlapping_zsks, lifetime, alg, size, with_state=True)
# - check apex # - check apex
@@ -662,9 +662,9 @@ def test_ksr_lastbundle(servers):
# - check rndc dnssec -status output # - check rndc dnssec -status output
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy) isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
# - zone is signed # - zone is signed
isctest.kasp.zone_is_signed(ns1, zone) isctest.kasp.check_zone_is_signed(ns1, zone)
# - dnssec_verify # - dnssec_verify
isctest.kasp.dnssec_verify(ns1, zone) isctest.kasp.check_dnssec_verify(ns1, zone)
# - check keys # - check keys
check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True) check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True)
# - check apex # - check apex
@@ -745,9 +745,9 @@ def test_ksr_inthemiddle(servers):
# - check rndc dnssec -status output # - check rndc dnssec -status output
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy) isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
# - zone is signed # - zone is signed
isctest.kasp.zone_is_signed(ns1, zone) isctest.kasp.check_zone_is_signed(ns1, zone)
# - dnssec_verify # - dnssec_verify
isctest.kasp.dnssec_verify(ns1, zone) isctest.kasp.check_dnssec_verify(ns1, zone)
# - check keys # - check keys
check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True) check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True)
# - check apex # - check apex
@@ -942,9 +942,9 @@ def test_ksr_unlimited(servers):
# - check rndc dnssec -status output # - check rndc dnssec -status output
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy) isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
# - zone is signed # - zone is signed
isctest.kasp.zone_is_signed(ns1, zone) isctest.kasp.check_zone_is_signed(ns1, zone)
# - dnssec_verify # - dnssec_verify
isctest.kasp.dnssec_verify(ns1, zone) isctest.kasp.check_dnssec_verify(ns1, zone)
# - check keys # - check keys
check_keys(zsks, lifetime, alg, size, with_state=True) check_keys(zsks, lifetime, alg, size, with_state=True)
# - check apex # - check apex
@@ -1039,9 +1039,9 @@ def test_ksr_twotone(servers):
# - check rndc dnssec -status output # - check rndc dnssec -status output
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy) isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
# - zone is signed # - zone is signed
isctest.kasp.zone_is_signed(ns1, zone) isctest.kasp.check_zone_is_signed(ns1, zone)
# - dnssec_verify # - dnssec_verify
isctest.kasp.dnssec_verify(ns1, zone) isctest.kasp.check_dnssec_verify(ns1, zone)
# - check keys # - check keys
alg = os.environ.get("DEFAULT_ALGORITHM_NUMBER") alg = os.environ.get("DEFAULT_ALGORITHM_NUMBER")
size = os.environ.get("DEFAULT_BITS") size = os.environ.get("DEFAULT_BITS")