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

[ENHANCEMENT] Migrate unit tests from go terratest to helm unittest #2473

Open
goatfryed opened this issue Oct 12, 2024 · 1 comment
Open
Labels
kind/enhancement New feature or request

Comments

@goatfryed
Copy link

goatfryed commented Oct 12, 2024

Describe the use case:
Testing / code base related / DX improvement

Describe the enhancement/feature:
Replace the existing unit testing based on go terratest with helm unittest

Desired outcome and acceptance tests:

  • increase readability of unit tests
  • increase self documentation capabilities of code base, improving user experience by tests as configuration examples
  • ease first time contributor entry level
  • better test feedback
  • remove requirement of go setup for contributors outside of integration testing, but add requirement for helm unittest plugin
  • golden files require re-approval

Explanation
First, let me explain the background that brought me here. I'm working on open sourcing a smaller helm chart and found @Zelldon's https://medium.com/@zelldon91/advanced-test-practices-for-helm-charts-587caeeb4cb while investigating testing best practices for helm chart projects. I want to say first that it's a really good read and I appreciate your effort in both coming up with it and sharing your knowledge. As a developer working with camunda professionally, I also appreciate your concerns for a stable, solid, well tested delivery up to the charts.

In my own investigation, I found that helm unittest covers all these requirements and some more in a really neat, descriptive, self documenting syntax. Compared to the present go templates, it drops a lot visual bloat that in turn makes the test better as a part of the documentation. Most importantly, it supports golden file tests (called snapshot testing over there) and property tests alike, opening up possibilities to combine both on subgraphs in the outputs.

I'd like to propose to create a PR that migrates the charts starting with one to helm unittest to investigate, showcase and discuss, if this would improve this project.
For me, it's a great exercise to familiarize myself more with both helm unittest as well as with the camunda helm charts and a fun little challenge. For you, I could imagine that it eases maintenance in the long run.

Of course, I realize that you have your established flows and that such a change should never add a burden on a maintainer team. In the short term it could be a disruptive change and doesn't justify the value - if it even adds any, who know. So even if you are interested in a PR, I fully understand and don't mind, if you agree and still dismiss the PR later, be it with little or with a lot of some more thought.

@goatfryed goatfryed added the kind/enhancement New feature or request label Oct 12, 2024
@aabouzaid aabouzaid added this to the 8.8 Release Cycle milestone Oct 21, 2024
@aabouzaid
Copy link
Member

aabouzaid commented Oct 21, 2024

@goatfryed Thanks a lot for your suggestion. 🙌
We will look into it, but unfortunately, not before the Camunda 8.9 cycle (April-October 2025).

Feel free to make a PoC, but as mentioned, I don't expect to look into it before April 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants