helm-charts/charts/other/app-template/tests/configmap/metadata_test.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 4d09009bf8
feat(common)!: Release version 0.2.0
- 🛑 BREAKING - Removed support for the openvpn and wireguard VPN types.
- Update container versions
- Added support for adding serviceMonitors to services.
- ConfigMap checksum logic now only looks at ConfigMap data
- Explicitly convert defaultMode to decimal notation in code-server addon.
2022-09-14 10:18:51 +02:00

87 lines
2.4 KiB
YAML

suite: configmap metadata
templates:
- common.yaml
tests:
- it: default metadata should pass
set:
configmap:
config:
enabled: true
asserts:
- documentIndex: &ConfigmapDocument 0
isKind:
of: ConfigMap
- documentIndex: *ConfigmapDocument
isNull:
path: metadata.annotations
- documentIndex: *ConfigmapDocument
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-0.2.0
- it: custom metadata should pass
set:
configmap:
config:
enabled: true
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &ConfigmapDocument 0
isKind:
of: ConfigMap
- documentIndex: *ConfigmapDocument
equal:
path: metadata.annotations
value:
test_annotation: test
- documentIndex: *ConfigmapDocument
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-0.2.0
test_label: test
- it: custom metadata with global metadata should pass
set:
global:
labels:
global_label: test
annotations:
global_annotation: test
configmap:
config:
enabled: true
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &ConfigmapDocument 0
isKind:
of: ConfigMap
- documentIndex: *ConfigmapDocument
equal:
path: metadata.annotations
value:
global_annotation: test
test_annotation: test
- documentIndex: *ConfigmapDocument
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-0.2.0
test_label: test