Improving DRY support - adding unit test for templates/gitea/config.yaml first document

This commit is contained in:
Ceddaerrix 2023-10-10 12:56:36 +00:00
parent 2ef96c449b
commit 3645ddd276

View File

@ -0,0 +1,25 @@
suite: config template
release:
name: gitea-unittests
namespace: testing
templates:
- templates/gitea/config.yaml
tests:
- it: inline config stringData.server 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:
- equal:
path: stringData.server.DOMAIN
value: "gitea.example.com"
documentIndex: 0
- equal:
path: stringData.server.ROOT_URL
value: "https://gitea.example.com"
documentIndex: 0