Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.32 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.32 KB

Testing

This directory contains a chart for unit testing lib-helm. lib-helm uses unittest helm plugin for unit testing.

Run tests

For running tests, use the next command:

make tests/unit

How to add test

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.

Snapshot asserts

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.