mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
29 lines
838 B
YAML
29 lines
838 B
YAML
---
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
|
suite: job - fields - restartPolicy
|
|
templates:
|
|
- common.yaml
|
|
values:
|
|
- ../_values/controllers_main_default_container.yaml
|
|
set:
|
|
controllers.main.type: job
|
|
tests:
|
|
- it: default configuration should pass
|
|
documentSelector:
|
|
path: $[?(@.kind == "Job")].metadata.name
|
|
value: release-name
|
|
asserts:
|
|
- equal:
|
|
path: spec.template.spec.restartPolicy
|
|
value: Never
|
|
|
|
- it: custom configuration should pass
|
|
set:
|
|
controllers.main.pod.restartPolicy: OnFailure
|
|
documentSelector:
|
|
path: $[?(@.kind == "Job")].metadata.name
|
|
value: release-name
|
|
asserts:
|
|
- equal:
|
|
path: spec.template.spec.restartPolicy
|
|
value: OnFailure
|