Skip to content

chore(test): fix flaky CBC test#191

Merged
kessplas merged 2 commits into
mainfrom
kessplas/cbc-fix
May 29, 2026
Merged

chore(test): fix flaky CBC test#191
kessplas merged 2 commits into
mainfrom
kessplas/cbc-fix

Conversation

@kessplas

Copy link
Copy Markdown
Contributor

Issue #, if available: n/a

Description of changes: This fix exists for other CBC tests, this PR adds the fix to this test.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kessplas kessplas marked this pull request as ready for review May 29, 2026 21:30
Comment thread test/test_decryption.py
Comment on lines +200 to +209
try:
pipeline.decrypt(
_response(metadata, ciphertext),
".instruction",
enable_delayed_authentication=False,
).read()
except S3EncryptionClientSecurityError as e:
assert "Failed to decrypt CBC content" in str(e)
return
pytest.fail("Wrong key did not produce CBC decryption error after 10 attempts")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda liked the pytest.raises style :)

@kessplas kessplas merged commit 7a22943 into main May 29, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants