-
Notifications
You must be signed in to change notification settings - Fork 8
flakiness - fix cert rotation tests #19
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. My comments are mostly questions. There is only one suggestion to change assert_certificate_rotation
slightly.
timeout=timeout, | ||
) | ||
|
||
from kubetester.mongodb import Phase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking q: any reason not to put this to the top of the file with rest of the imports?
docker/mongodb-enterprise-tests/tests/tls/tls_x509_configure_all_options_sc.py
Show resolved
Hide resolved
old_ac_version = KubernetesTester.get_automation_config()["version"] | ||
rotate_cert(namespace, certificate_name, should_block_until_ready=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_certificate_rotation
gives an impression that it does not make any changes and only asserts when in fact it does.
What do you think about the following suggestion?
- Moving these two lines into the caller functions
- Make
assert_certificate_rotation
acceptold_ac_version
as an argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed! bf2d183
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of context for transparency. We discussed it in DM: while I think it is good to keep mutation (cert rotation) separate from assertions, @nammn wanted to to keep everything together to avoid forgetting to do part of the checks.
At the same time I think it is more important to address the flake than worry about semantics here. We landed on the middle ground: renaming the function to rotate_and_assert_certificates
to more clearly indicate the purpose.
…herry-pick-flaky-fixes
Summary
Proof of Work
Checklist
Reminder (Please remove this when merging)