-
Notifications
You must be signed in to change notification settings - Fork 574
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
Revise delete tests #3822
base: master
Are you sure you want to change the base?
Revise delete tests #3822
Conversation
* Use files for legibility * Add describe/log collectors to every assert
Actually, this is low priority |
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.
lgtm
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
apply: | ||
- files/00-create-namespace.yaml |
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.
I don't see a files/00-create-namespace.yaml
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.
copy-paste error
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.
Maybe this test could be in a different directory?
testing/kuttl/e2e
delete/
00-create...
delete-<descriptive-suffix>/
10-create...
also maybe not, having each delete type in a directory makes sense too.
A better name on 10-*
would be appreciated. To see that it is deleting a replica cluster without having to click into the create-cluster.yaml file or the readme
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.
Better names, check
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.
same for this file name
|
||
* Start a regular cluster with 2 replicas | ||
* Delete it | ||
* Check that nothing remains | ||
|
||
#### Delete a cluster that never started | ||
#### Delete a cluster that never started (20-21) |
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.
Do we need to check this? Kube should cleanup the resources regardless of the cluster status
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.
Hmmm, I think this test was to check that we didn't have a finalizer on the cluster that made it impossible to delete while not running.
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.
would it make sense to put this in a TestStep - to be consistent with the delete-namespace test/other tests?
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.
According to the docs, the delete happens at the beginning of the step, so I think a delete/errors teststep might work. Eh, I avoided it in case that wasn't the case, but I'll try it
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.
LGTM
- type: command | ||
command: kubectl -n ${KUTTL_TEST_DELETE_NAMESPACE} describe pods --selector postgres-operator.crunchydata.com/cluster=delete-namespace | ||
- namespace: ${KUTTL_TEST_DELETE_NAMESPACE} | ||
selector: postgres-operator.crunchydata.com/cluster=delete-namespace |
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.
⛏️ Missing newlines on a few of the files.
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
What is the new behavior (if this is a feature change)?
Other Information: