helm-charts/charts/library/common/test-chart/unittests/pod/field_shareProcessNamespace_test.yaml
Bernd Schorgers a01a89cb13
feat(common): Release common 4.0.0 (#398)
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
2025-05-16 08:55:14 +02:00

39 lines
1.2 KiB
YAML

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: pod - fields - shareProcessNamespace
templates:
- common.yaml
values:
- ../_values/controllers_main_default_container.yaml
tests:
- it: shareProcessNamespace should not be present by default
documentSelector:
path: $[?(@.kind == "Deployment")].metadata.name
value: release-name
asserts:
- notExists:
path: spec.template.spec.shareProcessNamespace
- it: shareProcessNamespace disabled should pass
set:
defaultPodOptions:
shareProcessNamespace: false
documentSelector:
path: $[?(@.kind == "Deployment")].metadata.name
value: release-name
asserts:
- equal:
path: spec.template.spec.shareProcessNamespace
value: false
- it: shareProcessNamespace enabled should pass
set:
defaultPodOptions:
shareProcessNamespace: true
documentSelector:
path: $[?(@.kind == "Deployment")].metadata.name
value: release-name
asserts:
- equal:
path: spec.template.spec.shareProcessNamespace
value: true