This repository has been archived on 2024-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
onechart/charts/onechart/tests/ingress_domain_test.yaml
T
2021-05-12 13:03:10 +02:00

86 lines
2.2 KiB
YAML

suite: test deployment
templates:
- ingress.yaml
tests:
- it: Should set Ingress host name
set:
ingress:
host: chart-example.local
tlsEnabled: true
asserts:
- equal:
path: spec.tls
value:
- hosts:
- chart-example.local
secretName: tls-release-name
- equal:
path: spec.rules
value:
- host: chart-example.local
http:
paths:
- backend:
serviceName: release-name
servicePort: 80
- it: Should conform to DNS names
set:
ingress:
host: feature/my_branch.local
tlsEnabled: true
asserts:
- equal:
path: spec.tls
value:
- hosts:
- feature-my-branch.local
secretName: tls-release-name
- equal:
path: spec.rules
value:
- host: feature-my-branch.local
http:
paths:
- backend:
serviceName: release-name
servicePort: 80
- it: Should set Ingress annotation
set:
ingress:
host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- equal:
path: metadata.annotations
value:
kubernetes.io/ingress.class: nginx
- it: Should generate multiple ingresses
set:
ingresses:
- host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
- host: another.local
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- hasDocuments:
count: 2
- it: Should generate multiple ingresses
set:
ingress:
host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
ingresses:
- host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
- host: another.local
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- hasDocuments:
count: 3