tests: add a test to validate pause and resume feature#351
tests: add a test to validate pause and resume feature#351darthsuburbus wants to merge 4 commits intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: darthsuburbus The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @darthsuburbus! |
|
Hi @darthsuburbus. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for agent-sandbox canceled.
|
vicentefb
left a comment
There was a problem hiding this comment.
Thanks! This is a very valuable test that was missing. Overall, the logic is very solid. You're correctly simulating the exact behavior the controller executes when Replicas hits 0 (where it deletes the pod but retains the Sandbox CR and PVCs ), and then successfully validating the recovery. Left some comments.
8f8720b to
7103823
Compare
Thanks for the thoughtful feedback, I've addressed all comments. I can squash the commits before merging but keeping them for ease of review for now. |
| } | ||
| opts := []cmp.Option{ | ||
| cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime"), | ||
| cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime", "Message", "ObservedGeneration"), |
There was a problem hiding this comment.
why ignore observedGeneration? Seems that it may be a useful thing to check?
There was a problem hiding this comment.
What would be the reasoning around checking this? My assumption here was that we don't want the tests to rely on intermediate state changes or updates that the controller might be making to the resource, rather on just the end state that the test cares about validating. Happy to reinstate this though if there is something I am missing :-)
There was a problem hiding this comment.
new to this repo / project so I may well be wrong, but I was originally under the assumption that the test is in full control over the state changes and updates, and therefore should be able to reliably know what observedGeneration should be. If that's not accurate though, feel free to ignore this comment!
790488b to
88fed88
Compare
|
@darthsuburbus: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Fixes #248
Add a e2e test that tests out the pause and resume functionality implemented in #82:
This test addresses the request made in #248.
Testing Done