Topics

Helm unit tests

Simon Fontana Oscarsson
 

Hi,

Are there any good options for writing unit tests for Helm charts? My use case is that I want to test that, when setting a parameter, the correct changes are applied to the chart.

I've looked a bit at the helm-unittest project (https://github.com/lrills/helm-unittest) and it looks good enough. Unfortunately it is no longer maintained, last commit was almost a year ago and many issues are left unanswered. For example it doesn't have Helm v3 support (yes, there is a PR but I don't want to apply hotfixes and maintain the project myself).
Are there any other good projects with healthy community support for Helm chart unit tests?

--
SIMON FONTANA OSCARSSON
Software Developer

Ericsson
Ölandsgatan 1
37133 Karlskrona, Sweden
simon.fontana.oscarsson@...
www.ericsson.com

Gareth Rushgrove
 

As one of the maintainers I'm biased, but try out Conftest
https://github.com/instrumenta/conftest

We have a Helm plugin which makes this easier too
https://github.com/instrumenta/helm-conftest

Gareth

On Wed, 26 Feb 2020 at 15:48, Simon Fontana Oscarsson via
Lists.Cncf.Io <simon.fontana.oscarsson=ericsson.com@...>
wrote:


Hi,

Are there any good options for writing unit tests for Helm charts? My use case is that I want to test that, when setting a parameter, the correct changes are applied to the chart.

I've looked a bit at the helm-unittest project (https://github.com/lrills/helm-unittest) and it looks good enough. Unfortunately it is no longer maintained, last commit was almost a year ago and many issues are left unanswered. For example it doesn't have Helm v3 support (yes, there is a PR but I don't want to apply hotfixes and maintain the project myself).
Are there any other good projects with healthy community support for Helm chart unit tests?

--

SIMON FONTANA OSCARSSON
Software Developer

Ericsson
Ölandsgatan 1
37133 Karlskrona, Sweden
simon.fontana.oscarsson@...
www.ericsson.com

--
Gareth Rushgrove
@garethr

garethr.dev
devopsweekly.com

Simon Fontana Oscarsson
 

Thank you Gareth. At a first glance it looks good and I will surely try it out. 

--
SIMON FONTANA OSCARSSON
Software Developer

Ericsson
Ölandsgatan 1
37133 Karlskrona, Sweden
simon.fontana.oscarsson@...
www.ericsson.com

On ons, 2020-02-26 at 15:51 +0000, Gareth Rushgrove wrote:
As one of the maintainers I'm biased, but try out Conftest
https://protect2.fireeye.com/v1/url?k=e368c855-bfe21d50-e36888ce-861010bc36ff-8633b5071164f958&q=1&e=b790fd3f-f57a-40c5-8e65-dd11951c6ffe&u=https%3A%2F%2Fgithub.com%2Finstrumenta%2Fconftest

We have a Helm plugin which makes this easier too
https://protect2.fireeye.com/v1/url?k=c7f50a60-9b7fdf65-c7f54afb-861010bc36ff-879dd0a6072a1d53&q=1&e=b790fd3f-f57a-40c5-8e65-dd11951c6ffe&u=https%3A%2F%2Fgithub.com%2Finstrumenta%2Fhelm-conftest

Gareth

On Wed, 26 Feb 2020 at 15:48, Simon Fontana Oscarsson via
Lists.Cncf.Io <simon.fontana.oscarsson=ericsson.com@...>
wrote:
Hi, Are there any good options for writing unit tests for Helm charts? My use case is that I want to test that, when setting a parameter, the correct changes are applied to the chart. I've looked a bit at the helm-unittest project (https://protect2.fireeye.com/v1/url?k=3c2da40c-60a77109-3c2de497-861010bc36ff-58d3fe68ccadf71f&q=1&e=b790fd3f-f57a-40c5-8e65-dd11951c6ffe&u=https%3A%2F%2Fgithub.com%2Flrills%2Fhelm-unittest) and it looks good enough. Unfortunately it is no longer maintained, last commit was almost a year ago and many issues are left unanswered. For example it doesn't have Helm v3 support (yes, there is a PR but I don't want to apply hotfixes and maintain the project myself). Are there any other good projects with healthy community support for Helm chart unit tests? -- SIMON FONTANA OSCARSSON Software Developer Ericsson Ölandsgatan 1 37133 Karlskrona, Sweden simon.fontana.oscarsson@... www.ericsson.com