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

Support Helm unittest snapshot testing #16532

Closed
alonsodomin opened this issue Aug 16, 2022 · 1 comment · Fixed by #19264
Closed

Support Helm unittest snapshot testing #16532

alonsodomin opened this issue Aug 16, 2022 · 1 comment · Fixed by #19264
Labels
backend: Helm Helm backend-related issues enhancement

Comments

@alonsodomin
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The Helm unittest plugin has a feature that allows to produice snapshots of the rendered templates that can later be used to perform assertions against the whole snapshot instead of smaller chunks of the rendered result:
https://github.com/quintush/helm-unittest#snapshot-testing

Describe the solution you'd like
For this to have a good user experience should give the option to the end user to export the snapshots against the right location for each of the charts. This may be achieved with a helm-unittest-snapshot goal that would run the unittest plugin with the --update-snapshot flag, which will not run the tests but rather generate the said snapshots.

When running the tests, the snapshot files will also be loaded into the processes sandbox. Any changes that those snapshots may receive during the process execution can be re-exported as TestResult.extra_output so they can be compared against the snapshots in the workspace.

Describe alternatives you've considered
An alternative to the helm-unittest-snapshot goal would be use the already existent export-codegen goal.

Additional context
N/A

@stuhood
Copy link
Member

stuhood commented Aug 16, 2022

This relates to #11622, and should probably use a unified mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Helm Helm backend-related issues enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants