Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor tests to use static files, to ease development #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nitram509
Copy link

@nitram509 nitram509 commented Oct 23, 2024

Motivation

I found the tests using base64 encoded p12 data, was difficult to use / verify with e.g. openssl.
This refactoring uses regular files instead, which then can be analysed / verified by any developer straight and easier than before.
Additionally, I did rework the repetitive test code for the AESCBC128,192,256 into a table test, which makes the code more compact. Also the other three test function use embedded t.Run() logic, which is easier to read in the result/log (in case one runs the tests, the embedded test structure of the for-loop is then visible and easier to read.

Any feedback welcome

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.

1 participant