2023-09-22 15:09:13 +00:00
|
|
|
suite: ingress template
|
|
|
|
release:
|
|
|
|
name: gitea-unittests
|
|
|
|
namespace: testing
|
|
|
|
templates:
|
|
|
|
- templates/gitea/ingress.yaml
|
|
|
|
tests:
|
|
|
|
- it: hostname using TPL
|
|
|
|
set:
|
2023-12-06 13:32:09 +00:00
|
|
|
global.giteaHostName: 'gitea.example.com'
|
2023-09-22 15:09:13 +00:00
|
|
|
ingress.enabled: true
|
2023-12-06 13:32:09 +00:00
|
|
|
ingress.hosts[0].host: '{{ .Values.global.giteaHostName }}'
|
2023-09-22 15:09:13 +00:00
|
|
|
ingress.tls:
|
|
|
|
- secretName: gitea-tls
|
|
|
|
hosts:
|
2023-12-06 13:32:09 +00:00
|
|
|
- '{{ .Values.global.giteaHostName }}'
|
2023-09-22 15:09:13 +00:00
|
|
|
asserts:
|
2024-07-31 11:02:10 +00:00
|
|
|
- isKind:
|
|
|
|
of: Ingress
|
2023-09-22 15:09:13 +00:00
|
|
|
- equal:
|
|
|
|
path: spec.tls[0].hosts[0]
|
2023-12-06 13:32:09 +00:00
|
|
|
value: 'gitea.example.com'
|
2023-09-22 15:09:13 +00:00
|
|
|
- equal:
|
|
|
|
path: spec.rules[0].host
|
2023-12-06 13:32:09 +00:00
|
|
|
value: 'gitea.example.com'
|
2024-07-31 11:02:10 +00:00
|
|
|
- it: Ingress Class using TPL
|
|
|
|
set:
|
|
|
|
global.ingress.className: 'ingress-class'
|
|
|
|
ingress.className: '{{ .Values.global.ingress.className }}'
|
|
|
|
ingress.enabled: true
|
|
|
|
ingress.hosts[0].host: 'some-host'
|
|
|
|
ingress.tls:
|
|
|
|
- secretName: gitea-tls
|
|
|
|
hosts:
|
|
|
|
- 'some-host'
|
|
|
|
asserts:
|
|
|
|
- isKind:
|
|
|
|
of: Ingress
|
|
|
|
- equal:
|
|
|
|
path: spec.tls[0].hosts[0]
|
|
|
|
value: 'some-host'
|
|
|
|
- equal:
|
|
|
|
path: spec.rules[0].host
|
|
|
|
value: 'some-host'
|
|
|
|
- equal:
|
|
|
|
path: spec.ingressClassName
|
|
|
|
value: 'ingress-class'
|