mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +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:
committed by
Matthijs Mekking
parent
f5adeb6800
commit
e806d8c6f5
@@ -232,7 +232,7 @@ class Key:
|
||||
return self.path
|
||||
|
||||
|
||||
def zone_is_signed(server, zone):
|
||||
def check_zone_is_signed(server, zone):
|
||||
addr = server.ip
|
||||
fqdn = f"{zone}."
|
||||
|
||||
@@ -283,7 +283,7 @@ def zone_is_signed(server, zone):
|
||||
assert signed
|
||||
|
||||
|
||||
def dnssec_verify(server, zone):
|
||||
def check_dnssec_verify(server, zone):
|
||||
# Check if zone if DNSSEC valid with dnssec-verify.
|
||||
fqdn = f"{zone}."
|
||||
transfer = _query(server, fqdn, dns.rdatatype.AXFR)
|
||||
|
@@ -584,9 +584,9 @@ def test_ksr_common(servers):
|
||||
# - check rndc dnssec -status output
|
||||
isctest.kasp.check_dnssecstatus(ns1, zone, overlapping_zsks, policy=policy)
|
||||
# - zone is signed
|
||||
isctest.kasp.zone_is_signed(ns1, zone)
|
||||
isctest.kasp.check_zone_is_signed(ns1, zone)
|
||||
# - dnssec_verify
|
||||
isctest.kasp.dnssec_verify(ns1, zone)
|
||||
isctest.kasp.check_dnssec_verify(ns1, zone)
|
||||
# - check keys
|
||||
check_keys(overlapping_zsks, lifetime, alg, size, with_state=True)
|
||||
# - check apex
|
||||
@@ -662,9 +662,9 @@ def test_ksr_lastbundle(servers):
|
||||
# - check rndc dnssec -status output
|
||||
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
|
||||
# - zone is signed
|
||||
isctest.kasp.zone_is_signed(ns1, zone)
|
||||
isctest.kasp.check_zone_is_signed(ns1, zone)
|
||||
# - dnssec_verify
|
||||
isctest.kasp.dnssec_verify(ns1, zone)
|
||||
isctest.kasp.check_dnssec_verify(ns1, zone)
|
||||
# - check keys
|
||||
check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True)
|
||||
# - check apex
|
||||
@@ -745,9 +745,9 @@ def test_ksr_inthemiddle(servers):
|
||||
# - check rndc dnssec -status output
|
||||
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
|
||||
# - zone is signed
|
||||
isctest.kasp.zone_is_signed(ns1, zone)
|
||||
isctest.kasp.check_zone_is_signed(ns1, zone)
|
||||
# - dnssec_verify
|
||||
isctest.kasp.dnssec_verify(ns1, zone)
|
||||
isctest.kasp.check_dnssec_verify(ns1, zone)
|
||||
# - check keys
|
||||
check_keys(zsks, lifetime, alg, size, offset=offset, with_state=True)
|
||||
# - check apex
|
||||
@@ -942,9 +942,9 @@ def test_ksr_unlimited(servers):
|
||||
# - check rndc dnssec -status output
|
||||
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
|
||||
# - zone is signed
|
||||
isctest.kasp.zone_is_signed(ns1, zone)
|
||||
isctest.kasp.check_zone_is_signed(ns1, zone)
|
||||
# - dnssec_verify
|
||||
isctest.kasp.dnssec_verify(ns1, zone)
|
||||
isctest.kasp.check_dnssec_verify(ns1, zone)
|
||||
# - check keys
|
||||
check_keys(zsks, lifetime, alg, size, with_state=True)
|
||||
# - check apex
|
||||
@@ -1039,9 +1039,9 @@ def test_ksr_twotone(servers):
|
||||
# - check rndc dnssec -status output
|
||||
isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy)
|
||||
# - zone is signed
|
||||
isctest.kasp.zone_is_signed(ns1, zone)
|
||||
isctest.kasp.check_zone_is_signed(ns1, zone)
|
||||
# - dnssec_verify
|
||||
isctest.kasp.dnssec_verify(ns1, zone)
|
||||
isctest.kasp.check_dnssec_verify(ns1, zone)
|
||||
# - check keys
|
||||
alg = os.environ.get("DEFAULT_ALGORITHM_NUMBER")
|
||||
size = os.environ.get("DEFAULT_BITS")
|
||||
|
Reference in New Issue
Block a user