Chart: Improve #10673.

This commit is contained in:
Marco Ebert 2023-12-03 20:31:01 +01:00
parent e2856809a5
commit 2f7f4d70eb
4 changed files with 29 additions and 28 deletions

View file

@ -24,7 +24,7 @@ tests:
- it: should create a Service of type "NodePort" if `controller.service.external.enabled` is true and `controller.service.type` is "NodePort"
set:
controller.service.enabled: true
controller.service.external.enabled: true
controller.service.type: NodePort
asserts:
- equal:

View file

@ -1,19 +1,18 @@
suite: test default backend extra ConfigMaps
suite: Default Backend > Extra ConfigMaps
templates:
- default-backend-extra-configmaps.yaml
tests:
- it: should not create any ConfigMap by default
- it: should not create a ConfigMap if `defaultBackend.extraConfigMaps` is empty
set:
Release.Namespace: default
defaultBackend.enabled: true
defaultBackend.extraConfigMaps: []
asserts:
- hasDocuments:
count: 0
- it: should create one ConfigMap
- it: should create one ConfigMap if `defaultBackend.extraConfigMaps` has one element
set:
Release.Namespace: default
defaultBackend.enabled: true
defaultBackend.extraConfigMaps:
- name: my-configmap-1
@ -27,10 +26,12 @@ tests:
- equal:
path: metadata.name
value: my-configmap-1
- equal:
path: data.key1
value: value1
- it: should correctly render multiple ConfigMaps
- it: should create two ConfigMaps if `defaultBackend.extraConfigMaps` has two elements
set:
Release.Namespace: nginx
defaultBackend.enabled: true
defaultBackend.extraConfigMaps:
- name: my-configmap-1
@ -46,4 +47,4 @@ tests:
of: ConfigMap
- matchRegex:
path: metadata.name
pattern: "my-configmap-\\d+"
pattern: my-configmap-(1|2)