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

Fix intermittent ksr test failure

The test_ksr_twotwone may fail if the key id is shorter than 5 digits.
Add a leading space to the expected strings which start with the key
tag to avoid the issue.
This commit is contained in:
Matthijs Mekking
2024-10-24 14:30:51 +02:00
parent ac8db8041b
commit d5f32f6990

View File

@@ -348,13 +348,13 @@ def _check_signatures(signatures, covers, fqdn, keys):
if not signing:
for rrsig in signatures:
assert f"{key.tag} {fqdn}" not in rrsig
assert f" {key.tag} {fqdn}" not in rrsig
continue
if zrrsig and key.is_zsk():
has_rrsig = False
for rrsig in signatures:
if f"{key.tag} {fqdn}" in rrsig:
if f" {key.tag} {fqdn}" in rrsig:
has_rrsig = True
break
assert has_rrsig
@@ -362,12 +362,12 @@ def _check_signatures(signatures, covers, fqdn, keys):
if zrrsig and not key.is_zsk():
for rrsig in signatures:
assert f"{key.tag} {fqdn}" not in rrsig
assert f" {key.tag} {fqdn}" not in rrsig
if krrsig and key.is_ksk():
has_rrsig = False
for rrsig in signatures:
if f"{key.tag} {fqdn}" in rrsig:
if f" {key.tag} {fqdn}" in rrsig:
has_rrsig = True
break
assert has_rrsig
@@ -375,7 +375,7 @@ def _check_signatures(signatures, covers, fqdn, keys):
if krrsig and not key.is_ksk():
for rrsig in signatures:
assert f"{key.tag} {fqdn}" not in rrsig
assert f" {key.tag} {fqdn}" not in rrsig
return numsigs