blob: 55bcd04f9e2162c86fb006e43e13cf107c667b0d [file] [log] [blame]
suite: test ingress
templates:
- ingress.yaml
tests:
- it: should render nothing if not enabled
asserts:
- hasDocuments:
count: 0
- it: should render Ingress right if enabled
set:
ingress.enabled: true
service.externalPort: 12345
release:
name: my-release
asserts:
- hasDocuments:
count: 1
- isKind:
of: Ingress
- contains:
path: spec.rules[0].http.paths
content:
path: /
backend:
serviceName: my-release-with-subchart
servicePort: 12345
- isNull:
path: spec.tls
- it: should set annotations if given
set:
ingress.enabled: true
ingress.annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
ingress.kubernetes.io/rewrite-target: /
asserts:
- equal:
path: metadata.annotations
value:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
ingress.kubernetes.io/rewrite-target: /
- it: should set tls if given
set:
ingress.enabled: true
ingress.tls:
- secretName: my-tls-secret
asserts:
- equal:
path: spec.tls
value:
- secretName: my-tls-secret