This directory contains a chart for unit testing lib-helm
.
lib-helm
uses unittest helm plugin for unit testing.
For running tests, use the next command:
make tests/unit
You must create two files for definition (for example, helm_lib_is_ha_to_value
).
Create first file in templates directory with name define_name.yaml (for example, helm_lib_is_ha_to_value.yaml
).
This file should contain include definition (see this example).
The second file (with test suite) you should create in tests directory with name define_name_test.yaml (for example, helm_lib_is_ha_to_value_test.yaml
).
For writing tests read official documentation and examples for helm_lib_is_ha_to_value and helm_lib_kube_rbac_proxy_ca_certificate definitions.
If you use snapshot asserts, you should create/update snapshot file. Use the next command to do this:
make tests/unit/update-snapshot
After that, commit files.