Type object
File match **/charts/*/tests/*.yaml
Schema URL https://catalog.lintel.tools/schemas/schemastore/helm-unittest-test-suite/latest.json
Source https://raw.githubusercontent.com/helm-unittest/helm-unittest/refs/heads/main/schema/helm-testsuite.json

Validate with Lintel

npx @lintel/lintel check
Type: object

A helm test suite is a collection of tests with the same purpose and scope defined in one single file.

Properties

tests object[] required

tests (array) required

Where you define your test jobs to run

suite string

suite (string) optional

The suite name to show on test result output.

snapshotId string

snapshotId (string) optional

A suffix to your snapshot file for the tests. Ideal for helm tests.

values string[]

values (array) recommended

.The test values to apply for rendering of this chart.

set object

set (object) optional

Set the values directly in the suite file. The key is the value path with the format just like --set option of helm install, for example image.pullPolicy.

The value is anything you want to set to the path specified by the key, which can be even an array or an object.

templates string[]

templates (array) recommended

The template files scope to test in this suite. The full chart will be rendered, however only the listed templates are filtered for validation.

Template files that are put in a templates sub-folder can be addressed with a linux path separator. Also the templates/ can be omitted.

Partial templates (which are prefixed with and _) are added automatically even if it is in a templates sub-folder, you don't need to add them again.

excludeTemplates string[]

excludeTemplates (array) optional

The template files which should be excluded from the scope of this test suite. Using wildcards it is possible to exclude multiple templates without listing them one-by-one.

release object

release (object) optional

Define the {{ .Release }} object.

4 nested properties
name string

name (string) optional

The release name, default to "RELEASE-NAME".

namespace string

namespace (string) optional

The namespace which release be installed to, default to "NAMESPACE".

revision integer

revision (integer) optional

The revision of current build, default to 0.

upgrade boolean

upgrade (boolean) optional

Whether the build is an upgrade, default to false.

capabilities object

capabilities (object) optional

Define the {{ .Capabilities }} object.

3 nested properties
majorVersion integer

majorVersion (integer) optional

The kubernetes major version, default to the major version which is set by helm.

minorVersion integer

minorVersion (integer) optional

The kubernetes minor version, default to the minor version which is set by helm.

apiVersions array | null

apiVersions (array) optional

A set of versions, default to the versionset used by the defined kubernetes version.

skip object

skip (object) optional

Using this flag, helm-unittest will automatically skip the 'suite' or 'test'.

2 nested properties
reason string

reason (string)

The reason to skip the suite or 'test'.

minimumVersion string

minimumVersion (string) optional

The minimum version of helm-unittest plugin required to run this test suite. If set, do not set reason, otherwise the test suite will be skipped regardless of the version.

postRenderer object

postRenderer (object) optional

A helm post-renderer to apply after chart rendering but before validation.

2 nested properties
cmd string

cmd (string)

The full path to the command to invoke, or just its name if it's on '$PATH'.

args string[]

args (array)

A list of command-line arguments to pass to the cmd.

chart object

chart (object) optional

Define the {{ .Chart }} object.

2 nested properties
version string

version (string) optional

The semantic version of the chart, default to the version set in the Chart.

appVersion string

appVersion (string) optional

The app-version of the chart, default to the app-version set in the Chart.

kubernetesProvider object

kubernetesProvider: (object) optional

Define Kubernetes resources to fake.

2 nested properties
objects object[] required

objects: (array of objects)

Define the Kubernetes objects to fake

minItems=1
scheme object

scheme: (object)

Define the Kubernetes schema to fake

Definitions

values string[]

values (array) recommended

.The test values to apply for rendering of this chart.

capabilities object

capabilities (object) optional

Define the {{ .Capabilities }} object.

majorVersion integer

majorVersion (integer) optional

The kubernetes major version, default to the major version which is set by helm.

minorVersion integer

minorVersion (integer) optional

The kubernetes minor version, default to the minor version which is set by helm.

apiVersions array | null

apiVersions (array) optional

A set of versions, default to the versionset used by the defined kubernetes version.

chart object

chart (object) optional

Define the {{ .Chart }} object.

version string

version (string) optional

The semantic version of the chart, default to the version set in the Chart.

appVersion string

appVersion (string) optional

The app-version of the chart, default to the app-version set in the Chart.

documentIndex integer

documentIndex (integer) optional

The index of rendered documents (divided by ---) to be tested, default to -1, which results in asserting all documents (see Assertion).

Generally you can ignored this field if the template file render only one document.

documentSelector object

documentSelector (object) optional

The path of the key to be match and the match value to assert.

Using this information, helm-unittest will automatically discover the documentIndex.

Generally you can ignored this field if the template file render only one document.

path string required

path (string)

The documentSelector path to find.

value string | object

value (string|object) optional

When set, filter on value to match. When not set, filters on all documents where the path is found.

matchMany boolean

matchMany (boolean) optional

Set to *true to allow matching multiple documents. Defaults to false which means selector has to match single document across all templates.

skipEmptyTemplates boolean

skipEmptyTemplates (boolean) optional

Set to true to skip asserting templates which didn't render any matching documents. Defaults to *false which means selector have to find at least one document in every template.

skip object

skip (object) optional

Using this flag, helm-unittest will automatically skip the 'suite' or 'test'.

reason string

reason (string)

The reason to skip the suite or 'test'.

minimumVersion string

minimumVersion (string) optional

The minimum version of helm-unittest plugin required to run this test suite. If set, do not set reason, otherwise the test suite will be skipped regardless of the version.

postRenderer object

postRenderer (object) optional

A helm post-renderer to apply after chart rendering but before validation.

cmd string

cmd (string)

The full path to the command to invoke, or just its name if it's on '$PATH'.

args string[]

args (array)

A list of command-line arguments to pass to the cmd.

kubernetesProvider object

kubernetesProvider: (object) optional

Define Kubernetes resources to fake.

objects object[] required

objects: (array of objects)

Define the Kubernetes objects to fake

minItems=1
scheme object

scheme: (object)

Define the Kubernetes schema to fake

release object

release (object) optional

Define the {{ .Release }} object.

name string

name (string) optional

The release name, default to "RELEASE-NAME".

namespace string

namespace (string) optional

The namespace which release be installed to, default to "NAMESPACE".

revision integer

revision (integer) optional

The revision of current build, default to 0.

upgrade boolean

upgrade (boolean) optional

Whether the build is an upgrade, default to false.

templates string[]

templates (array) recommended

The template files scope to test in this suite. The full chart will be rendered, however only the listed templates are filtered for validation.

Template files that are put in a templates sub-folder can be addressed with a linux path separator. Also the templates/ can be omitted.

Partial templates (which are prefixed with and _) are added automatically even if it is in a templates sub-folder, you don't need to add them again.

excludeTemplates string[]

excludeTemplates (array) optional

The template files which should be excluded from the scope of this test suite. Using wildcards it is possible to exclude multiple templates without listing them one-by-one.

set object

set (object) optional

Set the values directly in the suite file. The key is the value path with the format just like --set option of helm install, for example image.pullPolicy.

The value is anything you want to set to the path specified by the key, which can be even an array or an object.

paths string[]

templates (array) optional . List of specs for length comparison.

path string

path (string) required

The set path to assert.

Map keys in path containing periods (.) are supported with the use of a jq-like syntax.

Generated by Lintel Catalog Builder 0.0.16