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
+2 -2
View File
@@ -5,14 +5,14 @@ release:
templates:
- templates/secret_inlineConfig.yaml
tests:
- it: "actions are enabled by default (based on vanilla Gitea behavior)"
- it: "Enable actions by default to match vanilla Gitea"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
notExists:
path: data.actions
- it: "actions can be disabled via inline config"
- it: "Disable actions via the inline config"
template: templates/secret_inlineConfig.yaml
set:
gitea.config.actions.ENABLED: false
+3 -3
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: "cache is configured correctly for valkey"
- it: "Configure the cache for valkey"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -17,7 +17,7 @@ tests:
ADAPTER=redis
HOST=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
- it: "cache is configured correctly for 'memory' when valkey is disabled"
- it: "Configure the cache for 'memory' when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -31,7 +31,7 @@ tests:
ADAPTER=memory
HOST=
- it: "cache can be customized when valkey is disabled"
- it: "Customize the cache when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -6,7 +6,7 @@ templates:
- templates/secret_admin.yaml
- templates/secret_config.yaml
tests:
- it: uses `gitea config edit-ini` to write app.ini from environment variables
- it: "Write app.ini from the environment variables via `gitea config edit-ini`"
template: templates/secret_config.yaml
asserts:
- documentIndex: 0
@@ -14,7 +14,7 @@ tests:
path: data["config_environment.sh"]
decodeBase64: true
pattern: 'gitea config edit-ini --apply-env --config .+GITEA_APP_INI.+ --out .+GITEA_APP_INI'
- it: renders data, not stringData, so removed keys are pruned on upgrade
- it: "Render data instead of stringData so removed keys are pruned on upgrade"
template: templates/secret_config.yaml
asserts:
- documentIndex: 0
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: metrics token is set
- it: "Configure the metrics token when it is set"
template: templates/secret_inlineConfig.yaml
set:
gitea:
@@ -18,7 +18,7 @@ tests:
value: |-
ENABLED=true
TOKEN=somepassword
- it: metrics token is empty
- it: "Omit the metrics token when it is empty"
template: templates/secret_inlineConfig.yaml
set:
gitea:
@@ -32,7 +32,7 @@ tests:
decodeBase64: true
value: |-
ENABLED=true
- it: metrics token is nil
- it: "Omit the metrics token when it is nil"
template: templates/secret_inlineConfig.yaml
set:
gitea:
@@ -46,7 +46,7 @@ tests:
decodeBase64: true
value: |-
ENABLED=true
- it: does not configures a token if metrics are disabled
- it: "Omit the metrics token when metrics are disabled"
template: templates/secret_inlineConfig.yaml
set:
gitea:
+3 -3
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: "queue is configured correctly for valkey"
- it: "Configure the queue for valkey"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -17,7 +17,7 @@ tests:
CONN_STR=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
TYPE=redis
- it: "queue is configured correctly for 'levelDB' when valkey is disabled"
- it: "Configure the queue for 'levelDB' when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -31,7 +31,7 @@ tests:
CONN_STR=
TYPE=level
- it: "queue can be customized when valkey is disabled"
- it: "Customize the queue when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: "[default values] uses ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL"
- it: "[default values] Use the ingress host for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/secret_inlineConfig.yaml
asserts:
- documentIndex: 0
@@ -24,7 +24,7 @@ tests:
################################################
- it: "[no ingress hosts] uses gitea http service for DOMAIN|SSH_DOMAIN|ROOT_URL"
- it: "[no ingress hosts] Use the HTTP Service for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/secret_inlineConfig.yaml
set:
ingress:
@@ -48,7 +48,7 @@ tests:
################################################
- it: "[provided via values] uses that for DOMAIN|SSH_DOMAIN|ROOT_URL"
- it: "[provided via values] Use the configured values for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/secret_inlineConfig.yaml
set:
gitea.config.server.DOMAIN: provided.example.com
@@ -77,7 +77,7 @@ tests:
################################################
- it: "[route enabled] uses route host for DOMAIN|SSH_DOMAIN|ROOT_URL"
- it: "[route enabled] Use the Route host for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/secret_inlineConfig.yaml
set:
route:
@@ -102,7 +102,7 @@ tests:
################################################
- it: "[route tls termination] uses https for ROOT_URL"
- it: "[route tls termination] Use https for ROOT_URL"
template: templates/secret_inlineConfig.yaml
set:
route:
@@ -119,7 +119,7 @@ tests:
################################################
- it: "[HTTPRoute enabled] uses first hostname for DOMAIN|SSH_DOMAIN|ROOT_URL"
- it: "[HTTPRoute enabled] Use the first hostname for DOMAIN|SSH_DOMAIN|ROOT_URL"
template: templates/secret_inlineConfig.yaml
set:
ingress:
@@ -152,7 +152,7 @@ tests:
################################################
- it: "[HTTPRoute tls] switches ROOT_URL to https"
- it: "[HTTPRoute tls] Switch ROOT_URL to https"
template: templates/secret_inlineConfig.yaml
set:
ingress:
+3 -3
View File
@@ -3,7 +3,7 @@ release:
name: gitea-unittests
namespace: testing
tests:
- it: "session is configured correctly for valkey"
- it: "Configure the session for valkey"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -17,7 +17,7 @@ tests:
PROVIDER=redis
PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
- it: "session is configured correctly for 'memory' when valkey is disabled"
- it: "Configure the session for 'memory' when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey:
@@ -31,7 +31,7 @@ tests:
PROVIDER=memory
PROVIDER_CONFIG=
- it: "session can be customized when valkey is disabled"
- it: "Customize the session when valkey is disabled"
template: templates/secret_inlineConfig.yaml
set:
valkey: