test: normalize the suite titles of the helm unit tests
Bash / bash-unittest (push) Successful in 14s
Bash / shellcheck (push) Successful in 20s
changelog / changelog (push) Successful in 16s
Helm / helm-lint (push) Successful in 15s
Helm / helm-unittest (push) Successful in 32s
Markdown linter / markdown-lint (push) Successful in 15s
Markdown linter / markdown-link-checker (push) Successful in 56s
Bash / bash-unittest (push) Successful in 14s
Bash / shellcheck (push) Successful in 20s
changelog / changelog (push) Successful in 16s
Helm / helm-lint (push) Successful in 15s
Helm / helm-unittest (push) Successful in 32s
Markdown linter / markdown-lint (push) Successful in 15s
Markdown linter / markdown-link-checker (push) Successful in 56s
The contributor guidelines never defined how a `suite` title has to look, only how an `it` title has to look. Without a rule five competing schemes grew side by side: `config template | cache config`, `deployment template (probes)`, `ServiceMonitor template (basic)`, `Test Gateway API httpRoute.yaml` and `Dependency checks | Customization integrity | valkey`. 24 of the 49 titles started with a lowercase letter, which contradicts the sentence rule that already applies to the test titles. More than cosmetics, the missing rule produced three concrete defects: - `deployment template` was used by both deployment-additional-config.yaml and extraInitContainers.yaml, and `Init template` by both init_directory_structure.sh.yaml and its rootless counterpart. `helm unittest` identifies a failing suite by its title, so a failure in either file printed the same header and the report did not say which file to open. - deployment/inline-config.yaml was titled `config template`, although it lives in the deployment directory and asserts on secret_inlineConfig.yaml. It read like a sixth member of the `config template | ...` group. - persistentVolumeClaim.yaml was titled `PVC template`, using exactly the short name the chart conventions forbid for files and keys. All suites now follow `Test <subject> <scenario>`, for example `Test deployment probes` or `Test gateway API httpRoute`. The subject is the template under test, the scenario is what distinguishes the suite from its siblings, so every title is unique and sorts next to its related suites. The `Test ` prefix of the Gateway API, ingress and route suites is kept, because it is the only part of the old schemes that already read as a sentence; the redundant `.yaml` suffix and the `tests` suffix of the storage class suite are dropped. The rule is written down in the Unit Tests section of the copilot instructions, so the next suite does not have to guess which of the five schemes was meant. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -57,6 +57,7 @@ data:
|
|||||||
- Each test must set all required values explicitly — do not rely on cross-test state.
|
- Each test must set all required values explicitly — do not rely on cross-test state.
|
||||||
- The `values.yaml` file must pass `yamllint`. The configuration is in `.yamllint.yaml`. Use `make yamllint` to run the linter.
|
- The `values.yaml` file must pass `yamllint`. The configuration is in `.yamllint.yaml`. Use `make yamllint` to run the linter.
|
||||||
- The title of the unit test should clearly describe the scenario being tested. As title must be use a short sentence starting with a capital letter and ending without a period.
|
- The title of the unit test should clearly describe the scenario being tested. As title must be use a short sentence starting with a capital letter and ending without a period.
|
||||||
|
- The `suite` title follows the pattern `Test <subject> <scenario>` (e.g. `Test deployment probes`). It must be unique across all suites, because `helm unittest` identifies a failing suite by this title.
|
||||||
- Each unit test must explicitly set a custom namespace and release name, rather than relying on defaults.
|
- Each unit test must explicitly set a custom namespace and release name, rather than relying on defaults.
|
||||||
- Assert `Secret` content via `data.*` with `decodeBase64: true` and add a `notExists` assertion for `stringData`.
|
- Assert `Secret` content via `data.*` with `decodeBase64: true` and add a `notExists` assertion for `stringData`.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Admin secret template
|
suite: Test admin secret
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | actions config
|
suite: Test config actions
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | cache config
|
suite: Test config cache
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | config_environment.sh
|
suite: Test config environment script
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | metrics section (metrics token)
|
suite: Test config metrics token
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | queue config
|
suite: Test config queue
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | server section (domain related)
|
suite: Test config server domain
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template | session config
|
suite: Test config session
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Dependency checks | Customization integrity | postgresql-ha
|
suite: Test dependency customization integrity of postgresql-ha
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Dependency checks | Customization integrity | postgresql
|
suite: Test dependency customization integrity of postgresql
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Dependency checks | Customization integrity | valkey
|
suite: Test dependency customization integrity of valkey
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Dependency checks | Major image bumps
|
suite: Test dependency major image bumps
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (HA)
|
suite: Test deployment high availability
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (admin user)
|
suite: Test deployment admin user
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (basic)
|
suite: Test deployment basics
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (checksum annotations)
|
suite: Test deployment checksum annotations
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template
|
suite: Test deployment additional config
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deprecation template (deployment)
|
suite: Test deployment deprecations
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (extraEnvSourceFile)
|
suite: Test deployment extraEnvSourceFile
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template
|
suite: Test deployment extraInitContainers
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (image configuration)
|
suite: Test deployment image configuration
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (init container configuration)
|
suite: Test deployment init container configuration
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: config template
|
suite: Test deployment inline config
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (openshift)
|
suite: Test deployment on OpenShift
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (probes)
|
suite: Test deployment probes
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: sidecar container
|
suite: Test deployment sidecar container
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (signing disabled)
|
suite: Test deployment with signing disabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (signing enabled)
|
suite: Test deployment with signing enabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: deployment template (SSH configuration)
|
suite: Test deployment SSH configuration
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ chart:
|
|||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
suite: Storage class configuration tests
|
suite: Test deployment storage class configuration
|
||||||
templates:
|
templates:
|
||||||
- templates/persistentVolumeClaim.yaml
|
- templates/persistentVolumeClaim.yaml
|
||||||
tests:
|
tests:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: sshService / httpService template (Services configuration)
|
suite: Test httpService and sshService configuration
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Test Gateway API backendTLSPolicy.yaml
|
suite: Test gateway API backendTLSPolicy
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Test Gateway API clientSettingsPolicy.yaml
|
suite: Test gateway API clientSettingsPolicy
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Test Gateway API httpRoute.yaml
|
suite: Test gateway API httpRoute
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Test Gateway API tcpRoute.yaml
|
suite: Test gateway API tcpRoute
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: GPG secret template (signing disabled)
|
suite: Test gpg secret with signing disabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: GPG secret template (signing enabled)
|
suite: Test gpg secret with signing enabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ chart:
|
|||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
suite: Test ingress.yaml
|
suite: Test ingress
|
||||||
templates:
|
templates:
|
||||||
- templates/ingress.yaml
|
- templates/ingress.yaml
|
||||||
tests:
|
tests:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Init template (basic)
|
suite: Test init secret basics
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Init template
|
suite: Test init directory structure script for the rootless image
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Init template
|
suite: Test init directory structure script
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Metrics secret template (monitoring disabled)
|
suite: Test metrics secret with monitoring disabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Metrics secret template (monitoring enabled)
|
suite: Test metrics secret with monitoring enabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ chart:
|
|||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
suite: PVC template
|
suite: Test persistentVolumeClaim
|
||||||
templates:
|
templates:
|
||||||
- templates/persistentVolumeClaim.yaml
|
- templates/persistentVolumeClaim.yaml
|
||||||
tests:
|
tests:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: Test route.yaml
|
suite: Test route
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ chart:
|
|||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
suite: ServiceAccount template
|
suite: Test serviceAccount
|
||||||
templates:
|
templates:
|
||||||
- templates/serviceAccount.yaml
|
- templates/serviceAccount.yaml
|
||||||
tests:
|
tests:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: ServiceMonitor template (basic)
|
suite: Test serviceMonitor basics
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: ServiceMonitor template (monitoring disabled)
|
suite: Test serviceMonitor with monitoring disabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
suite: ServiceMonitor template (monitoring enabled)
|
suite: Test serviceMonitor with monitoring enabled
|
||||||
release:
|
release:
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
|
|||||||
Reference in New Issue
Block a user