forgejo-helm/unittests/deployment/ingress-configuration.yaml
Michael Kriese 55c599d822
Some checks failed
build / lint-node (push) Has been cancelled
build / lint-helm (push) Has been cancelled
build / e2e (v1.27.13) (push) Has been cancelled
build / e2e (v1.28.9) (push) Has been cancelled
build / e2e (v1.29.4) (push) Has been cancelled
build / e2e (v1.30.2) (push) Has been cancelled
build / test-success (push) Has been cancelled
build / publish (push) Has been cancelled
feat: merge upstream change week 2024-31 (#688)
Reviewed-on: https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/688
2024-07-31 11:02:10 +00:00

47 lines
1.2 KiB
YAML

suite: ingress template
release:
name: gitea-unittests
namespace: testing
templates:
- templates/gitea/ingress.yaml
tests:
- it: hostname using TPL
set:
global.giteaHostName: 'gitea.example.com'
ingress.enabled: true
ingress.hosts[0].host: '{{ .Values.global.giteaHostName }}'
ingress.tls:
- secretName: gitea-tls
hosts:
- '{{ .Values.global.giteaHostName }}'
asserts:
- isKind:
of: Ingress
- equal:
path: spec.tls[0].hosts[0]
value: 'gitea.example.com'
- equal:
path: spec.rules[0].host
value: 'gitea.example.com'
- 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'