Commit e9cd6586 authored by Vincent Pelletier's avatar Vincent Pelletier

ca: Do not expect coverage of right-on-boundary codepath.

Make coverage tests tolerate the no-op code path where the backup ends
right on a block boundary not being exercised.
parent bf6a336a
...@@ -864,6 +864,8 @@ class UserCertificateAuthority(CertificateAuthority): ...@@ -864,6 +864,8 @@ class UserCertificateAuthority(CertificateAuthority):
authenticator.update(buf) authenticator.update(buf)
yield buf yield buf
yield authenticator.finalize() yield authenticator.finalize()
else: # pragma: no cover
pass
for chunk in signingIterator(): for chunk in signingIterator():
write(encryptor.update(padder.update(chunk))) write(encryptor.update(padder.update(chunk)))
write(encryptor.update(padder.finalize())) write(encryptor.update(padder.finalize()))
...@@ -966,6 +968,8 @@ class UserCertificateAuthority(CertificateAuthority): ...@@ -966,6 +968,8 @@ class UserCertificateAuthority(CertificateAuthority):
authenticator.update(chunk) authenticator.update(chunk)
authenticator.verify(buf[-32:]) authenticator.verify(buf[-32:])
yield chunk yield chunk
else: # pragma: no cover
pass
db_class.restore(db_path=db_path, restorator=verificator()) db_class.restore(db_path=db_path, restorator=verificator())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment