Chart Tests

    A test in a helm chart lives under the directory and is a poddefinition that specifies a container with a given command to run. The containershould exit successfully (exit 0) for a test to be considered a success. The poddefinition must contain one of the helm test hook annotations: helm.sh/hook:test-success or helm.sh/hook: test-failure.

    You can run the pre-defined tests in Helm on a release using the command helmtest <RELEASE_NAME>. For a chart consumer, this is a great way to sanity checkthat their release of a chart (or application) works as expected.

    test-success indicates that test pod should complete successfully. In otherwords, the containers in the pod should exit 0. test-failure is a way toassert that a test pod should not complete successfully. If the containers inthe pod do not exit 0, that indicates success.

    In :

    • $ helm install mariadb
    • You can define as many tests as you would like in a single yaml file or spreadacross several yaml files in the templates/ directory
    • You are welcome to nest your test suite under a directory like<chart-name>/templates/tests/ for more isolation