test: add unit tests for custom clusterDomain in database connection strings

Verify that PostgreSQL and PostgreSQL-HA service hostnames correctly
use a custom `clusterDomain` value instead of the default
`cluster.local` when connecting to the database.
This commit is contained in:
2026-07-20 18:59:30 +02:00
parent 0d6085f68d
commit 4f4bd4927c
2 changed files with 18 additions and 0 deletions
@@ -112,6 +112,15 @@ tests:
matchRegex:
path: stringData.database
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.cluster.local:1234
- it: "[gitea] connects to pgpool service with custom cluster domain"
set:
clusterDomain: my-special-cluster.local
template: templates/gitea/config.yaml
asserts:
- documentIndex: 0
matchRegex:
path: stringData.database
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234
- it: "[gitea] connects to configured database"
template: templates/gitea/config.yaml
asserts: