-
-
Notifications
You must be signed in to change notification settings - Fork 117
Add unit tests for a variety of chart aspects #288
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
|
@armab I added a bunch of tests here. I'll stop adding more to this PR and wait for your review. |
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.
The tests reveal a few inconsistencies that we might want to fix in follow-up PRs.
| # ServiceAccount does not have tier or vendor | ||
| #- equal: | ||
| # path: metadata.labels.tier | ||
| # value: backend | ||
| #- equal: | ||
| # path: metadata.labels.vendor | ||
| # value: stackstorm |
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 fix this in a follow up
| # st2actionrunner and st2client do not have checksum annotations | ||
| # (even though they probably should) | ||
| - isNull: &assert_checksum | ||
| path: spec.template.metadata.annotations.[checksum/post-start-script] |
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.
Fix this in a follow up (need to drop the condition since they always have a script)
| # st2client hard codes resources.requests | ||
| - equal: | ||
| path: spec.template.spec.containers[0].resources.requests | ||
| value: | ||
| memory: "5Mi" | ||
| cpu: "5m" | ||
| documentIndex: 12 |
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 we should make this configurable in a follow up.
| # st2client does not allow attaching serviceAccount | ||
| - isNull: | ||
| path: spec.template.spec.serviceAccountName | ||
| documentIndex: 12 |
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.
That's odd. Maybe add st2client.serviceAccount.attach in a follow up.
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.
Thanks @cognifloyd 👍
I'd also say add a few quick unit tests for the #218 and let's merge it to call that done.
|
@cognifloyd It all looks already great. Feel free to merge! I really meant it would be nice to add tests in the #218 so we can merge that one too, but with |
Part of #28