camunda / camunda-platform-helm

Camunda Platform 8 Self-Managed Helm charts
https://docs.camunda.io/docs/self-managed/overview/
Apache License 2.0
74 stars 137 forks source link

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

Open goatfryed opened 2 weeks ago

goatfryed commented 2 weeks ago

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:

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.

aabouzaid commented 1 week ago

@goatfryed Thanks a lot for your suggestion. :raised_hands: 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.