mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-06 12:32:05 -04:00
[9.20] fix: test: Fix intermittent ksr test failure
A test 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. Closes #5002 Backport of MR !9688 Merge branch 'backport-5002-unexpected-match-ksr-twotwone-9.20' into 'bind-9.20' See merge request isc-projects/bind9!9692
This commit is contained in:
commit
c905bf1c71
1 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue