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

Unit tests #239

Closed
nitrocode opened this issue Jan 2, 2023 · 3 comments · Fixed by #334
Closed

Unit tests #239

nitrocode opened this issue Jan 2, 2023 · 3 comments · Fixed by #334

Comments

@nitrocode
Copy link
Member

It would be nice to test out the helm chart using unit tests.

This has come up a few times since contributions can introduce breaking changes.

Options

  1. Using https://www.phillipsj.net/posts/yes-you-can-unit-test-helm-charts/ with golang and terratest
  2. Using https://blog.ediri.io/how-to-unit-test-your-helm-charts with quintush/helm-unittest
  3. helm test
    • The command helm test is more of an integration test since it requires deploying the chart

Whatever is chosen, the tests should capture at least

  • enabling a single vcs - test github, gitlab, bitbucket, azuredevops, etc
  • tbd
@GMartinez-Sisti
Copy link
Member

I love the idea of doing unit tests with option 2 https://github.com/helm-unittest/helm-unittest. Option 1 might provide more flexibility, but not everyone knows golang and then you have to manage go and package versions, etc. helm-unittest can be executed as a helm plugin or simply in a docker image, and I think this will provide a better experience for contributors and new comers.

I'm happy to take this so I can learn how to use helm-unittest. My first PR on this would be to create a basic scaffold to cover some simple helm chart configs such as nameOverride and fullnameOverride. We can build up from there. WDYT?

@jamengual
Copy link
Contributor

awesome idea.

@nitrocode
Copy link
Member Author

I started using option 2, helm unit test, internally and it's been very helpful at catching breaking changes.

Looking forward to PR #334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants