Small demo helm chart with tests that validate the kubernetes yaml files that generated by the templates. The tests are written using kubetest, powerfull tool that let you easily write tests for those files.
Running the tests
- Generate the files using
helm template . -f tests/values.yaml > template.yaml
- Run the tests using
kubetest template.yaml --verbose.
How does it works?
demo/tests/values.yamlfile define various values for your template.
helm templateuse this file to generate kuberenetes yaml. You can set here all the various configurations of your templates, and even have multiple values files for different tests.
- The tests, located at
demo/tests/tests.skyrunning the validation on the configuration files. Take a look at the test, it is pretty simple - testing the the
values.yamlactually used. Feel free to modify the tests and watch it broken.
- Docker file - with all the dependencies, to make it easier to run the tests
- Add CI to the demo, make it easier to understand how to run the tests