test: normalize the titles of the helm unit tests
Bash / shellcheck (push) Successful in 8s
Bash / bash-unittest (push) Successful in 24s
changelog / changelog (push) Successful in 16s
Helm / helm-lint (push) Successful in 18s
Helm / helm-unittest (push) Successful in 35s

The contributor guidelines require that the title of a unit test is "a short sentence starting with a capital
letter and ending without a period". Only 30 of the 269 titles followed that rule. The remaining ones were
lowercase verb phrases ("renders a deployment"), which made the test output read inconsistently depending on
which suite was running, and made it impossible to tell a convention violation from an intentional style.

All titles are now imperative, capitalized and unquoted-safe:

  renders a deployment                                 -> Render a Deployment
  should not render when gatewayAPI.enabled is false   -> Skip rendering when gatewayAPI.enabled is false
  skips gpg volume spec                                -> Skip the gpg volume spec

The bracketed prefixes of the dependency checks and of the server section suite are kept, because they group
the tests by the chart they assert on. Only the sentence behind the prefix was rewritten.

Beyond the pure capitalization three classes of titles needed real rewording:

- The titles in image-configuration.yaml named a subject instead of a scenario ("default values", "tag
  override", "digest and global registry"). They now describe what is rendered.
- init_directory_structure.sh-rootless.yaml carried "it does not chown /data ...", which rendered as
  "it it does not chown" in the test output.
- The "should" prefix in the Gateway API and route suites added no information once the title is a sentence.

The title of the GIT_GC_REPOS test lost its embedded double quotes. The title was previously an unquoted YAML
scalar, so the quotes were literal characters; quoting the title turned them into a parse error. The value is
unambiguous without them.

Three byte-identical tests asserting pgpool.adminPassword existed in customization-integrity-postgresql-ha.yaml
- same template, same assertion, same expected value. They were a copy-paste artifact and shared one title, so
two of them are removed. No coverage is lost, which is why the test count drops from 269 to 267.

No snapshot files are tracked and no suite uses matchSnapshot, so retitling cannot invalidate stored snapshots.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-10-03 21:17:18 +02:00
co-authored by Copilot
parent 7c18b18a47
commit bb3b59f1ee
46 changed files with 250 additions and 264 deletions
@@ -25,7 +25,7 @@ set:
persistence:
size: 1337Mi
tests:
- it: "[postgresql-ha] DB settings are applied as expected"
- it: "[postgresql-ha] Apply the database settings"
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
asserts:
- documentIndex: 0
@@ -40,7 +40,7 @@ tests:
content:
name: POSTGRES_USER
value: "gitea-username"
- it: "[postgresql-ha] DB passwords are applied as expected"
- it: "[postgresql-ha] Apply the database passwords"
template: charts/postgresql-ha/templates/postgresql/secrets.yaml
asserts:
- documentIndex: 0
@@ -55,49 +55,35 @@ tests:
equal:
path: data["password"]
value: "Z2l0ZWEtcGFzc3dvcmQ=" # postgresql-ha.postgresql.password is overwritten by postgresql-ha.global.postgresql.password and should not be referenced here
- it: "[postgresql-ha] pgpool.adminPassword is applied as expected"
- it: "[postgresql-ha] Apply pgpool.adminPassword"
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["admin-password"]
value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA=="
- it: "[postgresql-ha] pgpool.adminPassword is applied as expected"
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["admin-password"]
value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA=="
- it: "[postgresql-ha] pgpool.adminPassword is applied as expected"
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["admin-password"]
value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA=="
- it: "[postgresql-ha] pgpool.srCheckPassword is applied as expected"
- it: "[postgresql-ha] Apply pgpool.srCheckPassword"
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["sr-check-password"]
value: "Y3VzdG9tLXBhc3N3b3JkLXNyLWNoZWNr"
- it: "[postgresql-ha] persistence.size is applied as expected"
- it: "[postgresql-ha] Apply persistence.size"
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
asserts:
- documentIndex: 0
equal:
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
value: "1337Mi"
- it: "[postgresql-ha] service.ports.postgresql is applied as expected"
- it: "[postgresql-ha] Apply service.ports.postgresql"
template: charts/postgresql-ha/templates/pgpool/service.yaml
asserts:
- documentIndex: 0
equal:
path: spec.ports[0].port
value: 1234
- it: "[postgresql-ha] renders the referenced service"
- it: "[postgresql-ha] Render the referenced Service"
template: charts/postgresql-ha/templates/pgpool/service.yaml
asserts:
- containsDocument:
@@ -105,7 +91,7 @@ tests:
apiVersion: v1
name: gitea-unittests-postgresql-ha-pgpool
namespace: testing
- it: "[gitea] connects to pgpool service"
- it: "[gitea] Connect to the pgpool Service"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
@@ -113,7 +99,7 @@ tests:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.cluster.local:1234
- it: "[gitea] connects to pgpool service with custom cluster domain"
- it: "[gitea] Connect to the pgpool Service with a custom cluster domain"
set:
clusterDomain: my-special-cluster.local
template: templates/secret_inlineConfig.yaml
@@ -123,7 +109,7 @@ tests:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234
- it: "[gitea] connects to configured database"
- it: "[gitea] Connect to the configured database"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
@@ -20,7 +20,7 @@ set:
persistence:
size: 1337Mi
tests:
- it: "[postgresql] DB settings are applied as expected"
- it: "[postgresql] Apply the database settings"
template: charts/postgresql/templates/primary/statefulset.yaml
asserts:
- documentIndex: 0
@@ -35,28 +35,28 @@ tests:
content:
name: POSTGRES_USER
value: "gitea-username"
- it: "[postgresql] DB password is applied as expected"
- it: "[postgresql] Apply the database password"
template: charts/postgresql/templates/secrets.yaml
asserts:
- documentIndex: 0
equal:
path: data["password"]
value: "Z2l0ZWEtcGFzc3dvcmQ="
- it: "[postgresql] primary.persistence.size is applied as expected"
- it: "[postgresql] Apply primary.persistence.size"
template: charts/postgresql/templates/primary/statefulset.yaml
asserts:
- documentIndex: 0
equal:
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
value: "1337Mi"
- it: "[postgresql] global.postgresql.service.ports.postgresql is applied as expected"
- it: "[postgresql] Apply global.postgresql.service.ports.postgresql"
template: charts/postgresql/templates/primary/svc.yaml
asserts:
- documentIndex: 0
equal:
path: spec.ports[0].port
value: 1234
- it: "[postgresql] renders the referenced service"
- it: "[postgresql] Render the referenced Service"
template: charts/postgresql/templates/primary/svc.yaml
asserts:
- containsDocument:
@@ -64,7 +64,7 @@ tests:
apiVersion: v1
name: gitea-unittests-postgresql
namespace: testing
- it: "[gitea] connects to postgresql service"
- it: "[gitea] Connect to the postgresql Service"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
@@ -72,7 +72,7 @@ tests:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql.testing.svc.cluster.local:1234
- it: "[gitea] connects to postgresql service with custom cluster domain"
- it: "[gitea] Connect to the postgresql Service with a custom cluster domain"
set:
clusterDomain: my-special-cluster.local
template: templates/secret_inlineConfig.yaml
@@ -82,7 +82,7 @@ tests:
path: data.database
decodeBase64: true
pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234
- it: "[gitea] connects to configured database"
- it: "[gitea] Connect to the configured database"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
@@ -12,14 +12,14 @@ set:
permissions: "~* &* +@all"
password: gitea-password
tests:
- it: "[valkey] valkey.auth.aclUsers.default.password is applied as expected"
- it: "[valkey] Apply valkey.auth.aclUsers.default.password"
template: charts/valkey/templates/secret.yaml
asserts:
- documentIndex: 0
equal:
path: data.default-password
value: "Z2l0ZWEtcGFzc3dvcmQ="
- it: "[valkey] renders the referenced service"
- it: "[valkey] Render the referenced Service"
template: charts/valkey/templates/service.yaml
asserts:
- containsDocument:
@@ -34,7 +34,7 @@ tests:
port: 6379
targetPort: tcp
protocol: TCP
- it: "[gitea] waits for valkey to be up and running"
- it: "[gitea] Wait for valkey to be up and running"
template: templates/secret_init.yaml
asserts:
- documentIndex: 0
@@ -42,7 +42,7 @@ tests:
path: data["configure_gitea.sh"]
decodeBase64: true
pattern: nc -vz -w2 gitea-unittests-valkey.testing.svc.cluster.local 6379
- it: "[gitea] waits for valkey to be up and running with custom cluster domain"
- it: "[gitea] Wait for valkey to be up and running with a custom cluster domain"
set:
clusterDomain: my-special-cluster.local
template: templates/secret_init.yaml
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: "[postgresql-ha] ensures we detect major image version upgrades"
- it: "[postgresql-ha] Detect major image version upgrades"
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
set:
postgresql:
@@ -16,7 +16,7 @@ tests:
path: spec.template.spec.containers[0].image
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
pattern: bitnamilegacy/postgresql-repmgr:17.+$
- it: "[postgresql] ensures we detect major image version upgrades"
- it: "[postgresql] Detect major image version upgrades"
template: charts/postgresql/templates/primary/statefulset.yaml
set:
postgresql:
@@ -29,7 +29,7 @@ tests:
path: spec.template.spec.containers[0].image
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
pattern: bitnamilegacy/postgresql:17.+$
- it: "[valkey] ensures we detect major image version upgrades"
- it: "[valkey] Detect major image version upgrades"
template: charts/valkey/templates/deploy_valkey.yaml
set:
valkey: