forgejo-helm/unittests/config/server-section_domain.yaml

68 lines
2.1 KiB
YAML
Raw Permalink Normal View History

suite: config template | server section (domain related)
release:
name: gitea-unittests
namespace: testing
tests:
2023-12-06 13:32:09 +00:00
- it: '[default values] uses ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL'
template: templates/gitea/config.yaml
asserts:
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nDOMAIN=git.example.com
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nSSH_DOMAIN=git.example.com
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nROOT_URL=http://git.example.com
################################################
2023-12-06 13:32:09 +00:00
- it: '[no ingress hosts] uses gitea http service for DOMAIN|SSH_DOMAIN|ROOT_URL'
template: templates/gitea/config.yaml
set:
ingress:
hosts: []
asserts:
- documentIndex: 0
matchRegex:
path: stringData.server
2023-12-06 10:54:17 +00:00
pattern: \nDOMAIN=gitea-unittests-forgejo-http.testing.svc.cluster.local
- documentIndex: 0
matchRegex:
path: stringData.server
2023-12-06 10:54:17 +00:00
pattern: \nSSH_DOMAIN=gitea-unittests-forgejo-http.testing.svc.cluster.local
- documentIndex: 0
matchRegex:
path: stringData.server
2023-12-06 10:54:17 +00:00
pattern: \nROOT_URL=http://gitea-unittests-forgejo-http.testing.svc.cluster.local
################################################
2023-12-06 13:32:09 +00:00
- it: '[provided via values] uses that for DOMAIN|SSH_DOMAIN|ROOT_URL'
template: templates/gitea/config.yaml
set:
gitea.config.server.DOMAIN: provided.example.com
ingress:
hosts:
- host: non-used.example.com
paths:
- path: /
pathType: Prefix
asserts:
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nDOMAIN=provided.example.com
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nSSH_DOMAIN=provided.example.com
- documentIndex: 0
matchRegex:
path: stringData.server
pattern: \nROOT_URL=http://provided.example.com