Unit Tests

Abstract

Unit tests for helm charts.

Unit Tests#

Usage#

  1. Install the [helm unittest] plugin.

    install#
    helm plugin install https://github.com/helm-unittest/helm-unittest
    
  2. Run the tests.

    test#
    helm unittest -f 'tests/*.yaml' .
    

Test Suites#

This provides the following suites.

StatefulSet Suite#

suite

StatefulSet Test Suite


Tests to validate the deployment of the described StatefulSet.

suite: test for statefulset
release:
  name: chart
templates:
- templates/statefulset.yaml
values:
- ../values.yaml
tests

StatefulSet Tests


Tests for StatefulSet Template

tests:
- asserts:
  - isKind:
      of: StatefulSet
  - equal:
      path: metadata.name
      value: template-replace-
  it: should be a StatefulSet