helm-charts/charts/other/app-template/tests/controller/metadata_statefulset_test.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 72670526a3
feat(common): Release version 1.2.0 (#92)
* fix(common): fix incorrect route default values (#91)
* fix(common): make `sectionName` optional for route parentRefs
* fix(common): name primary route correctly
* feat(common): add controller.type of cronjob (#87)
* fix(common): Fix invalid persistence type message (#85)
* feat(common): Allow setting container restartPolicy

Co-authored-by: András Maróy <andras@maroy.hu>
Co-authored-by: loeken <loeken@internetz.me>
Co-authored-by: Han Cen <hi@chamburr.com>
2022-12-05 14:36:41 +01:00

83 lines
2.3 KiB
YAML

suite: controller metadata statefulset
templates:
- common.yaml
tests:
- it: default metadata should pass
set:
controller.type: statefulset
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: StatefulSet
- documentIndex: *ControllerDoc
isNull:
path: metadata.annotations
- documentIndex: *ControllerDoc
equal:
path: metadata.labels
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.2.0
- it: custom metadata should pass
set:
controller:
type: statefulset
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: StatefulSet
- documentIndex: *ControllerDoc
equal:
path: metadata.annotations
value:
test_annotation: test
- documentIndex: *ControllerDoc
equal:
path: metadata.labels
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME
helm.sh/chart: app-template-1.2.0
test_label: test
- it: custom metadata with global metadata should pass
set:
global:
labels:
global_label: test
annotations:
global_annotation: test
controller:
type: statefulset
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &ControllerDoc 0
isKind:
of: StatefulSet
- documentIndex: *ControllerDoc
equal:
path: metadata.annotations
value:
global_annotation: test
test_annotation: test
- documentIndex: *ControllerDoc
equal:
path: metadata.labels
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: RELEASE-NAME
global_label: test
helm.sh/chart: app-template-1.2.0
test_label: test