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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user