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

[Request] Unit/Template Tests for helm chart #142

Closed
tthvo opened this issue May 29, 2024 · 5 comments
Closed

[Request] Unit/Template Tests for helm chart #142

tthvo opened this issue May 29, 2024 · 5 comments
Assignees
Labels
help wanted Extra attention is needed test

Comments

@tthvo
Copy link
Member

tthvo commented May 29, 2024

Describe the feature

Not related to this PR but one suggestion I think we might benefit from is unit/template testing for helm chart. This can help: https://github.com/helm-unittest/helm-unittest

During this PR, it took me a while to see that the --- (yaml separator) leaked into a template field (e.g. namespace: myns---) due to space trimming but chart renders fine. It would be nice to have testing to ease debugging :D

Originally posted by @tthvo in #128 (comment)

Anything other information?

Down the line, we can establish some more e2e tests like scorecards, on top of the connection test: https://helm.sh/docs/topics/chart_tests/

@tthvo tthvo added help wanted Extra attention is needed test labels May 29, 2024
@tthvo
Copy link
Member Author

tthvo commented May 29, 2024

This requires a bit of research to design a framework and conventions. @ebaron @andrewazores what are your thoughts?

@andrewazores
Copy link
Member

It's worth investing the time into. After 3.0 is shipped we should continue to spend some time on improving the overall testing situation because 3.0 is quite far behind what 2.4 had, which already didn't have as much automated testing as I would like.

Adding more testing capabilities at higher levels of abstraction, like the Helm chart and Operator scorecard tests, seems like a powerful tool. Something we have always lacked in our automated testing has been the capability to test with different configuration parameters (ie environment variables), so that was only ever done in the old codebase by whitebox unit testing and using mocks to test very specific behaviours under different environment variable settings. Testing at these higher levels lets us do integration/end-to-end testing under those conditions which is very preferable.

@tthvo
Copy link
Member Author

tthvo commented May 30, 2024

Thanks, sounds good! @mwangggg @aali309 anyone interested in this work?

@aali309
Copy link
Contributor

aali309 commented May 31, 2024

Thanks, sounds good! @mwangggg @aali309 anyone interested in this work?

Yes, I can try to look at it and see how far I can go once done with my pending PRs.

@aali309 aali309 self-assigned this Jun 25, 2024
@tthvo
Copy link
Member Author

tthvo commented Jul 16, 2024

I guess this can now be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed test
Projects
None yet
Development

No branches or pull requests

3 participants