helm-charts/charts/other/app-template/tests/ingress/metadata_test.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs bce21cffef
feat(common): Release version 1.2.1 (#95)
* fix(common): Clean leftover `secret` behavior under `envFrom`

* fix(common) wrong indentation in _cronjob.tpl (#99)

* fixed wrong indentation, cronjob + configmaps throws an error otherwise

* feat: Update code-server image tag to 4.9.1

* Allow setting `ttlSecondsAfterFinished` for CronJobs

Co-authored-by: loeken <loeken@internetz.me>
2023-01-02 16:47:38 +01:00

83 lines
2.3 KiB
YAML

suite: ingress metadata
templates:
- common.yaml
tests:
- it: default metadata should pass
set:
ingress.main.enabled: true
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
isNull:
path: metadata.annotations
- documentIndex: *IngressDocument
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.1
- it: custom metadata should pass
set:
ingress.main:
enabled: true
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.annotations
value:
test_annotation: test
- documentIndex: *IngressDocument
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.1
test_label: test
- it: custom metadata with global metadata should pass
set:
global:
labels:
global_label: test
annotations:
global_annotation: test
ingress.main:
enabled: true
annotations:
test_annotation: test
labels:
test_label: test
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.annotations
value:
global_annotation: test
test_annotation: test
- documentIndex: *IngressDocument
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.1
test_label: test