update tests

This commit is contained in:
pat-s 2024-07-13 13:57:12 +02:00
parent d99b24fd2e
commit 4c0b7f83cd
No known key found for this signature in database
GPG Key ID: 3C6318841EF78925

View File

@ -3,41 +3,32 @@ templates:
- templates/gitea/ingress.yaml
tests:
- it: should fail when both ingress.className and ingress.ingressClassName are defined
template: templates/gitea/ingress.yaml
set:
ingress.enabled: true
ingress.className: "ingress-class"
ingress.ingressClassName: "ingress-class"
ingress:
enabled: true
className: ingress-class
ingressClassName: ingress-class
asserts:
- failedTemplate:
errorMessage: "ingress.ingressClassName and ingress.className cannot be defined at the same time. Please only choose one."
- it: should succeed when only ingress.className is defined
set:
ingress.enabled: true
ingress.ingressClassName: "ingress-class"
asserts:
- hasDocuments:
count: 1
- it: should succeed when only ingress.ingressClassName is defined
set:
ingress.enabled: true
ingress.ingressClassName: "ingress-class"
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.ingressClassName
value: ingress-class
- it: should succeed when neither ingress.className nor ingress.ingressClassName are defined
template: templates/gitea/ingress.yaml
set:
ingress.enabled: true
ingress.className: "ingress-class"
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.ingressClassName
value: ingress-class
- it: should succeed when only ingress.ingressClassName is defined
template: templates/gitea/ingress.yaml
set:
ingress.enabled: true
ingress.ingressClassName: "ingress-class"
asserts:
- equal:
path: spec.ingressClassName
value: ingress-class