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
+4 -4
View File
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: fails with multiple replicas and "GIT_GC_REPOS" enabled
- it: "Fail with multiple replicas and GIT_GC_REPOS enabled"
template: templates/secret_config.yaml
set:
deployment:
@@ -28,7 +28,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'gitea.config.cron.GIT_GC_REPOS.enabled = false'."
- it: fails with multiple replicas and RWX file system not set
- it: "Fail with multiple replicas and no RWX file system"
template: templates/secret_config.yaml
set:
deployment:
@@ -36,7 +36,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "When using multiple replicas, a RWX file system is required and persistence.new.accessModes[0] must be set to ReadWriteMany."
- it: fails with multiple replicas and bleve issue indexer
- it: "Fail with multiple replicas and the bleve issue indexer"
template: templates/secret_config.yaml
set:
deployment:
@@ -52,7 +52,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "When using multiple replicas, the issue indexer (gitea.config.indexer.ISSUE_INDEXER_TYPE) must be set to a HA-ready provider such as 'meilisearch', 'elasticsearch' or 'db' (if the DB is HA-ready)."
- it: fails with multiple replicas and bleve repo indexer
- it: "Fail with multiple replicas and the bleve repo indexer"
template: templates/secret_config.yaml
set:
deployment:
+4 -4
View File
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: reads the admin credentials from the generated secret
- it: "Read the admin credentials from the generated Secret"
template: templates/deployment.yaml
asserts:
- contains:
@@ -44,7 +44,7 @@ tests:
name: GITEA_ADMIN_PASSWORD_MODE
value: keepUpdated
- it: reads the admin credentials from the configured keys of an existing secret
- it: "Read the admin credentials from the configured keys of an existing Secret"
template: templates/deployment.yaml
set:
secrets.admin.existingSecret.enabled: true
@@ -78,7 +78,7 @@ tests:
key: custom-email
name: custom-admin-secret
- it: omits the admin environment when the admin user is disabled
- it: "Omit the admin environment when the admin user is disabled"
template: templates/deployment.yaml
set:
secrets.admin.enabled: false
@@ -94,7 +94,7 @@ tests:
name: GITEA_ADMIN_PASSWORD_MODE
any: true
- it: fails on an unsupported password mode
- it: "Fail on an unsupported password mode"
template: templates/deployment.yaml
set:
secrets.admin.passwordMode: unsupported
+32 -32
View File
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: renders a deployment
- it: "Render a Deployment"
template: templates/deployment.yaml
asserts:
- hasDocuments:
@@ -20,14 +20,14 @@ tests:
kind: Deployment
apiVersion: apps/v1
name: gitea-unittests
- it: renders no deployment when disabled
- it: "Skip rendering when the Deployment is disabled"
template: templates/deployment.yaml
set:
deployment.enabled: false
asserts:
- hasDocuments:
count: 0
- it: deployment labels are set
- it: "Render the configured Deployment labels"
template: templates/deployment.yaml
set:
deployment.labels:
@@ -45,7 +45,7 @@ tests:
path: spec.selector.matchLabels
content:
hello: world
- it: deployment labels are not in selector matchLabels
- it: "Omit the Deployment labels from the selector matchLabels"
template: templates/deployment.yaml
set:
deployment.labels:
@@ -57,7 +57,7 @@ tests:
value:
app.kubernetes.io/name: gitea
app.kubernetes.io/instance: gitea-unittests
- it: deployment labels are always rendered
- it: "Render the Deployment labels even when none are configured"
template: templates/deployment.yaml
asserts:
- isSubset:
@@ -67,12 +67,12 @@ tests:
app.kubernetes.io/name: gitea
app.kubernetes.io/instance: gitea-unittests
app.kubernetes.io/managed-by: Helm
- it: deployment annotations are undefined
- it: "Omit the Deployment annotations when none are configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: metadata.annotations
- it: deployment annotations are set
- it: "Render the configured Deployment annotations"
template: templates/deployment.yaml
set:
deployment.annotations:
@@ -82,12 +82,12 @@ tests:
path: metadata.annotations
value:
hello: world
- it: nodeSelector is undefined
- it: "Omit the nodeSelector when none is configured"
asserts:
- notExists:
path: spec.template.spec.nodeSelector
template: templates/deployment.yaml
- it: nodeSelector is defined
- it: "Render the configured nodeSelector"
set:
deployment.nodeSelector:
foo: bar
@@ -99,12 +99,12 @@ tests:
foo: bar
bar: foo
template: templates/deployment.yaml
- it: affinity is undefined
- it: "Omit the affinity when none is configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.affinity
- it: affinity is defined
- it: "Render the configured affinity"
template: templates/deployment.yaml
set:
deployment.affinity:
@@ -128,12 +128,12 @@ tests:
operator: In
values:
- linux
- it: dnsConfig is undefined
- it: "Omit the dnsConfig when none is configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.dnsConfig
- it: dnsConfig is defined
- it: "Render the configured dnsConfig"
template: templates/deployment.yaml
set:
deployment.dnsConfig:
@@ -151,12 +151,12 @@ tests:
options:
- name: ndots
value: "2"
- it: priorityClassName is undefined
- it: "Omit the priorityClassName when none is configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.priorityClassName
- it: priorityClassName is defined
- it: "Render the configured priorityClassName"
template: templates/deployment.yaml
set:
deployment.priorityClassName: high-priority
@@ -164,12 +164,12 @@ tests:
- equal:
path: spec.template.spec.priorityClassName
value: high-priority
- it: schedulerName is undefined
- it: "Omit the schedulerName when none is configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.schedulerName
- it: schedulerName is defined
- it: "Render the configured schedulerName"
template: templates/deployment.yaml
set:
deployment.schedulerName: stork
@@ -177,7 +177,7 @@ tests:
- equal:
path: spec.template.spec.schedulerName
value: stork
- it: strategy defaults to a rolling update
- it: "Default the strategy to a rolling update"
template: templates/deployment.yaml
asserts:
- equal:
@@ -187,7 +187,7 @@ tests:
rollingUpdate:
maxUnavailable: 0
maxSurge: 100%
- it: strategy omits rollingUpdate for other strategy types
- it: "Omit rollingUpdate for other strategy types"
template: templates/deployment.yaml
set:
deployment.strategy.type: Recreate
@@ -196,12 +196,12 @@ tests:
path: spec.strategy
value:
type: Recreate
- it: tolerations are undefined
- it: "Omit the tolerations when none are configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.tolerations
- it: tolerations are defined
- it: "Render the configured tolerations"
template: templates/deployment.yaml
set:
deployment.tolerations:
@@ -217,12 +217,12 @@ tests:
operator: Equal
value: postgres
effect: NoSchedule
- it: topologySpreadConstraints are undefined
- it: "Omit the topologySpreadConstraints when none are configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.topologySpreadConstraints
- it: topologySpreadConstraints are defined
- it: "Render the configured topologySpreadConstraints"
template: templates/deployment.yaml
set:
deployment.topologySpreadConstraints:
@@ -243,7 +243,7 @@ tests:
matchLabels:
app.kubernetes.io/instance: gitea-unittests
- it: "injects TMP_EXISTING_ENVS_FILE as environment variable to 'init-app-ini' init container"
- it: "Inject TMP_EXISTING_ENVS_FILE into the 'init-app-ini' init container"
template: templates/deployment.yaml
asserts:
- contains:
@@ -251,7 +251,7 @@ tests:
content:
name: TMP_EXISTING_ENVS_FILE
value: /tmp/existing-envs
- it: "injects ENV_TO_INI_MOUNT_POINT as environment variable to 'init-app-ini' init container"
- it: "Inject ENV_TO_INI_MOUNT_POINT into the 'init-app-ini' init container"
template: templates/deployment.yaml
asserts:
- contains:
@@ -259,7 +259,7 @@ tests:
content:
name: ENV_TO_INI_MOUNT_POINT
value: /env-to-ini-mounts
- it: "deployment.gitea.env is injected into all init containers and the gitea container"
- it: "Inject deployment.gitea.env into all init containers and the gitea container"
template: templates/deployment.yaml
set:
deployment.gitea.env:
@@ -286,7 +286,7 @@ tests:
content:
name: VARIABLE
value: my-value
- it: CPU resources are defined as well as GOMAXPROCS
- it: "Render GOMAXPROCS when the CPU resources are defined"
template: templates/deployment.yaml
set:
deployment.gitea.resources:
@@ -314,7 +314,7 @@ tests:
requests:
cpu: 100ms
memory: 100Mi
- it: container resources default to an empty map and GOMAXPROCS is omitted
- it: "Default the container resources to an empty map and omit GOMAXPROCS"
template: templates/deployment.yaml
asserts:
- equal:
@@ -328,12 +328,12 @@ tests:
resourceFieldRef:
divisor: "1"
resource: limits.cpu
- it: pod level resources are undefined
- it: "Omit the pod level resources when none are configured"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.resources
- it: pod level resources are defined
- it: "Render the configured pod level resources"
template: templates/deployment.yaml
set:
deployment.resources:
@@ -353,7 +353,7 @@ tests:
requests:
cpu: 250m
memory: 256Mi
- it: Init containers have correct volumeMount path
- it: "Render the configured volumeMount path of the init containers"
template: templates/deployment.yaml
set:
initContainersScriptsVolumeMountPath: "/custom/init/path"
@@ -364,7 +364,7 @@ tests:
- equal:
path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath
value: "/custom/init/path"
- it: Init containers have correct volumeMount path if there is no override
- it: "Render the default volumeMount path of the init containers"
template: templates/deployment.yaml
asserts:
- equal:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: omits the checksum annotations by default
- it: "Omit the checksum annotations by default"
template: templates/deployment.yaml
set:
secrets.admin.enabled: true
@@ -37,7 +37,7 @@ tests:
- notExists:
path: spec.template.metadata.annotations["checksum/metrics"]
- it: adds a checksum annotation for every Secret when addSHASumAnnotation is enabled
- it: "Add a checksum annotation for every Secret when addSHASumAnnotation is enabled"
template: templates/deployment.yaml
set:
secrets.admin.addSHASumAnnotation: true
@@ -74,7 +74,7 @@ tests:
- exists:
path: spec.template.metadata.annotations["checksum/metrics"]
- it: omits the checksum annotation of a single disabled Secret only
- it: "Omit the checksum annotation of a single disabled Secret only"
template: templates/deployment.yaml
set:
secrets.admin.addSHASumAnnotation: false
@@ -111,7 +111,7 @@ tests:
- notExists:
path: spec.template.metadata.annotations["checksum/metrics"]
- it: adds the checksum of Secrets provided by the user
- it: "Add the checksum of Secrets provided by the user"
template: templates/deployment.yaml
set:
secrets.admin.enabled: true
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: Renders a deployment
- it: "Render a Deployment with additionalConfigFromEnvs"
template: templates/deployment.yaml
asserts:
- hasDocuments:
@@ -20,7 +20,7 @@ tests:
kind: Deployment
apiVersion: apps/v1
name: gitea-unittests
- it: Deployment with empty additionalConfigFromEnvs
- it: "Render the Deployment with empty additionalConfigFromEnvs"
template: templates/deployment.yaml
set:
gitea.additionalConfigFromEnvs: []
@@ -48,7 +48,7 @@ tests:
value: /tmp/existing-envs
- name: ENV_TO_INI_MOUNT_POINT
value: /env-to-ini-mounts
- it: Deployment with standard additionalConfigFromEnvs
- it: "Render the Deployment with standard additionalConfigFromEnvs"
template: templates/deployment.yaml
set:
gitea.additionalConfigFromEnvs: [{name: GITEA_database_HOST, value: my-db:123}, {name: GITEA_database_USER, value: my-user}]
@@ -80,7 +80,7 @@ tests:
value: my-db:123
- name: GITEA_database_USER
value: my-user
- it: Deployment with templated additionalConfigFromEnvs
- it: "Render the Deployment with templated additionalConfigFromEnvs"
template: templates/deployment.yaml
set:
gitea.misc.host: my-db-host:321
@@ -114,7 +114,7 @@ tests:
value: my-db-host:321
- name: GITEA_database_USER
value: my-db-user
- it: Deployment with additionalConfigFromEnvs templated secret name
- it: "Render the Deployment with a templated Secret name in additionalConfigFromEnvs"
template: templates/deployment.yaml
set:
gitea.misc.existingSecret: my-db-secret
+25 -25
View File
@@ -5,11 +5,11 @@ release:
templates:
- templates/deprecation.yaml
tests:
- it: renders nothing with the default values
- it: "Render nothing with the default values"
asserts:
- hasDocuments:
count: 0
- it: fails when the removed `affinity` value is set
- it: "Fail when the removed `affinity` value is set"
set:
affinity:
nodeAffinity:
@@ -23,14 +23,14 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`affinity` does no longer exist. Please refer to the changelog and configure `deployment.affinity` instead."
- it: fails when the removed `containerSecurityContext` value is set
- it: "Fail when the removed `containerSecurityContext` value is set"
set:
containerSecurityContext:
runAsUser: 1000
asserts:
- failedTemplate:
errorMessage: "`containerSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.gitea.securityContext` instead."
- it: fails when the removed `deployment.env` value is set
- it: "Fail when the removed `deployment.env` value is set"
set:
deployment.env:
- name: VARIABLE
@@ -38,7 +38,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`deployment.env` does no longer exist. Please refer to the changelog and configure `deployment.gitea.env` instead."
- it: fails when the removed `dnsConfig` value is set
- it: "Fail when the removed `dnsConfig` value is set"
set:
dnsConfig:
nameservers:
@@ -46,7 +46,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`dnsConfig` does no longer exist. Please refer to the changelog and configure `deployment.dnsConfig` instead."
- it: fails when the removed `extraContainerVolumeMounts` value is set
- it: "Fail when the removed `extraContainerVolumeMounts` value is set"
set:
extraContainerVolumeMounts:
- name: postgres-ssl-vol
@@ -54,7 +54,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead."
- it: fails when the removed `extraInitVolumeMounts` value is set
- it: "Fail when the removed `extraInitVolumeMounts` value is set"
set:
extraInitVolumeMounts:
- name: postgres-ssl-vol
@@ -62,7 +62,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraInitVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.<initContainer>.volumeMounts` instead."
- it: fails when the removed `extraVolumeMounts` value is set
- it: "Fail when the removed `extraVolumeMounts` value is set"
set:
extraVolumeMounts:
- name: postgres-ssl-vol
@@ -70,7 +70,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `deployment.<initContainer>.volumeMounts` instead."
- it: fails when the removed `extraVolumes` value is set
- it: "Fail when the removed `extraVolumes` value is set"
set:
extraVolumes:
- name: postgres-ssl-vol
@@ -79,39 +79,39 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead."
- it: fails when the removed `ingress.className` value is set
- it: "Fail when the removed `ingress.className` value is set"
set:
ingress.className: ""
asserts:
- failedTemplate:
errorMessage: "`ingress.className` does no longer exist. Please refer to the changelog and configure `ingress.ingressClassName` instead."
- it: fails when the removed `nodeSelector` value is set
- it: "Fail when the removed `nodeSelector` value is set"
set:
nodeSelector:
foo: bar
asserts:
- failedTemplate:
errorMessage: "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead."
- it: fails when the removed `openshift.hostUsers` value is set
- it: "Fail when the removed `openshift.hostUsers` value is set"
set:
openshift.hostUsers: false
asserts:
- failedTemplate:
errorMessage: "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead."
- it: fails when the removed `priorityClassName` value is set
- it: "Fail when the removed `priorityClassName` value is set"
set:
priorityClassName: high-priority
asserts:
- failedTemplate:
errorMessage: "`priorityClassName` does no longer exist. Please refer to the changelog and configure `deployment.priorityClassName` instead."
- it: fails when the removed `podSecurityContext` value is set
- it: "Fail when the removed `podSecurityContext` value is set"
set:
podSecurityContext:
fsGroup: 1000
asserts:
- failedTemplate:
errorMessage: "`podSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` instead."
- it: fails when the removed `postExtraInitContainers` value is set
- it: "Fail when the removed `postExtraInitContainers` value is set"
set:
postExtraInitContainers:
- name: post-init-container
@@ -119,7 +119,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`postExtraInitContainers` does no longer exist. Please refer to the changelog and append an entry with a `container` key to `deployment.initContainers` instead."
- it: fails when the removed `preExtraInitContainers` value is set
- it: "Fail when the removed `preExtraInitContainers` value is set"
set:
preExtraInitContainers:
- name: pre-init-container
@@ -127,7 +127,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`preExtraInitContainers` does no longer exist. Please refer to the changelog and prepend an entry with a `container` key to `deployment.initContainers` instead."
- it: fails when the removed `resources` value is set
- it: "Fail when the removed `resources` value is set"
set:
resources:
limits:
@@ -135,40 +135,40 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead."
- it: fails when the removed `replicaCount` value is set
- it: "Fail when the removed `replicaCount` value is set"
set:
replicaCount: 2
asserts:
- failedTemplate:
errorMessage: "`replicaCount` does no longer exist. Please refer to the changelog and configure `deployment.replicas` instead."
- it: fails when the removed `schedulerName` value is set
- it: "Fail when the removed `schedulerName` value is set"
set:
schedulerName: stork
asserts:
- failedTemplate:
errorMessage: "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead."
- it: fails when the removed `securityContext` value is set
- it: "Fail when the removed `securityContext` value is set"
set:
securityContext:
runAsUser: 1000
asserts:
- failedTemplate:
errorMessage: "`securityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` and `deployment.gitea.securityContext` instead."
- it: fails when the removed `strategy` value is set
- it: "Fail when the removed `strategy` value is set"
set:
strategy:
type: Recreate
asserts:
- failedTemplate:
errorMessage: "`strategy` does no longer exist. Please refer to the changelog and configure `deployment.strategy` instead."
- it: fails when the removed `test` value is set
- it: "Fail when the removed `test` value is set"
set:
test:
enabled: false
asserts:
- failedTemplate:
errorMessage: "`test` does no longer exist. Please refer to the changelog. The `helm test` connection Pod has been removed without replacement."
- it: fails when the removed `tolerations` value is set
- it: "Fail when the removed `tolerations` value is set"
set:
tolerations:
- key: database/type
@@ -178,14 +178,14 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead."
- it: fails when the removed `topologySpreadConstraints` value is set
- it: "Fail when the removed `topologySpreadConstraints` value is set"
set:
topologySpreadConstraints:
- topologyKey: kubernetes.io/hostname
asserts:
- failedTemplate:
errorMessage: "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead."
- it: skips the deprecation checks when `checkDeprecation` is disabled
- it: "Skip the deprecation checks when `checkDeprecation` is disabled"
set:
checkDeprecation: false
affinity:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: uses direct execution when extraEnvSourceFile is not set
- it: "Use direct execution when extraEnvSourceFile is not set"
template: templates/deployment.yaml
asserts:
- equal:
@@ -25,7 +25,7 @@ tests:
- notExists:
path: spec.template.spec.initContainers[2].args
- it: sources env file in init-app-ini when extraEnvSourceFile is set
- it: "Source the env file in init-app-ini when extraEnvSourceFile is set"
template: templates/deployment.yaml
set:
gitea:
@@ -41,7 +41,7 @@ tests:
path: spec.template.spec.initContainers[1].args[0]
pattern: config_environment\.sh
- it: sources env file in configure-gitea when extraEnvSourceFile is set
- it: "Source the env file in configure-gitea when extraEnvSourceFile is set"
template: templates/deployment.yaml
set:
gitea:
@@ -57,7 +57,7 @@ tests:
path: spec.template.spec.initContainers[2].args[0]
pattern: configure_gitea\.sh
- it: sources env file in configure-gpg when extraEnvSourceFile is set with signing enabled
- it: "Source the env file in configure-gpg when extraEnvSourceFile is set and signing is enabled"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -76,7 +76,7 @@ tests:
path: spec.template.spec.initContainers[2].args[0]
pattern: configure_gpg_environment\.sh
- it: includes file existence check in source command
- it: "Include a file existence check in the source command"
template: templates/deployment.yaml
set:
gitea:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: Render the deployment (default)
- it: "Render the Deployment with the default init containers"
asserts:
- hasDocuments:
count: 1
@@ -21,7 +21,7 @@ tests:
count: 3
template: templates/deployment.yaml
- it: Render the deployment (signing)
- it: "Render the Deployment with the signing init container"
set:
secrets.gpg.enabled: true
secrets.gpg.existingSecret.enabled: true
@@ -35,7 +35,7 @@ tests:
count: 4
template: templates/deployment.yaml
- it: Render the deployment (extraInitContainers)
- it: "Render the Deployment with extraInitContainers"
set:
deployment.initContainers:
- container:
@@ -68,7 +68,7 @@ tests:
value: foo
template: templates/deployment.yaml
- it: renders the chart-managed init containers in the configured order
- it: "Render the chart-managed init containers in the configured order"
template: templates/deployment.yaml
set:
deployment.initContainers:
@@ -82,7 +82,7 @@ tests:
path: spec.template.spec.initContainers[1].name
value: init-directories
- it: fails when an init container entry sets both container and link
- it: "Fail when an init container entry sets both container and link"
template: templates/deployment.yaml
set:
deployment.initContainers:
@@ -94,7 +94,7 @@ tests:
- failedTemplate:
errorMessage: "deployment.initContainers[0]: `container` and `link` are mutually exclusive"
- it: fails when an init container entry sets neither container nor link
- it: "Fail when an init container entry sets neither container nor link"
template: templates/deployment.yaml
set:
deployment.initContainers:
@@ -103,7 +103,7 @@ tests:
- failedTemplate:
errorMessage: "deployment.initContainers[0]: either `container` or `link` must be set"
- it: fails when an init container links to an unknown configuration
- it: "Fail when an init container links to an unknown configuration"
template: templates/deployment.yaml
set:
deployment.initContainers:
@@ -14,13 +14,13 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: default values
- it: "Render the default image reference"
template: templates/deployment.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3-rootless"
- it: tag override
- it: "Render a custom image tag"
template: templates/deployment.yaml
set:
deployment.gitea.image.tag: "1.19.4"
@@ -28,7 +28,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.4-rootless"
- it: root-based image
- it: "Render the root-based image variant"
template: templates/deployment.yaml
set:
deployment.gitea.image.rootless: false
@@ -36,7 +36,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3"
- it: scoped registry
- it: "Render a scoped image registry"
template: templates/deployment.yaml
set:
deployment.gitea.image.registry: "example.com"
@@ -44,7 +44,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "example.com/gitea:1.19.3-rootless"
- it: global registry
- it: "Render the global image registry"
template: templates/deployment.yaml
set:
global.imageRegistry: "global.example.com"
@@ -52,7 +52,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "global.example.com/gitea:1.19.3-rootless"
- it: digest for rootless image
- it: "Render a digest for the rootless image"
template: templates/deployment.yaml
set:
deployment:
@@ -64,7 +64,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: image fullOverride (does not append rootless)
- it: "Render image.fullOverride without appending the rootless suffix"
template: templates/deployment.yaml
set:
deployment:
@@ -81,7 +81,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3"
- it: digest for root-based image
- it: "Render a digest for the root-based image"
template: templates/deployment.yaml
set:
deployment:
@@ -93,7 +93,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: digest and global registry
- it: "Render a digest together with the global image registry"
template: templates/deployment.yaml
set:
global.imageRegistry: "global.example.com"
@@ -102,7 +102,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
- it: correctly renders floating tag references
- it: "Render unquoted floating tag references"
template: templates/deployment.yaml
set:
# use non-quoted values on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
@@ -123,7 +123,7 @@ tests:
- equal:
path: spec.template.spec.containers[0].image
value: "docker.gitea.com/gitea:1.21-rootless"
- it: init containers use their own image configuration
- it: "Render the own image configuration of the init containers"
template: templates/deployment.yaml
set:
deployment.initDirectories.image.registry: "init.example.com"
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: appends the per-container env
- it: "Append the per-container env"
template: templates/deployment.yaml
set:
deployment.initDirectories.env:
@@ -37,7 +37,7 @@ tests:
name: INIT_DIRECTORIES
value: "1"
- it: renders the per-container envFrom
- it: "Render the per-container envFrom"
template: templates/deployment.yaml
set:
deployment.initAppIni.envFrom:
@@ -52,7 +52,7 @@ tests:
- secretRef:
name: special-secret
- it: appends the per-container volumeMounts
- it: "Append the per-container volumeMounts"
template: templates/deployment.yaml
set:
deployment.initConfigureGitea.volumeMounts:
@@ -73,7 +73,7 @@ tests:
mountPath: /configmap
readOnly: true
- it: overrides the resources of a single init container
- it: "Override the resources of a single init container"
template: templates/deployment.yaml
set:
deployment.initDirectories.resources:
@@ -93,7 +93,7 @@ tests:
cpu: 100m
memory: 128Mi
- it: overrides the security context of a single init container
- it: "Override the security context of a single init container"
template: templates/deployment.yaml
set:
deployment.gitea.securityContext:
@@ -108,7 +108,7 @@ tests:
path: spec.template.spec.initContainers[1].securityContext.runAsUser
value: 1000
- it: renders the envFrom of the gitea container
- it: "Render the envFrom of the gitea container"
template: templates/deployment.yaml
set:
deployment.gitea.envFrom:
@@ -121,7 +121,7 @@ tests:
- configMapRef:
name: special-config
- it: omits envFrom when unset
- it: "Omit the envFrom when it is unset"
template: templates/deployment.yaml
asserts:
- notExists:
+2 -2
View File
@@ -5,7 +5,7 @@ release:
templates:
- templates/secret_inlineConfig.yaml
tests:
- it: inline config data.server using TPL
- it: "Render the inline config of data.server via tpl"
set:
global.giteaHostName: "gitea.example.com"
ingress.enabled: true
@@ -34,7 +34,7 @@ tests:
path: data.server
decodeBase64: true
pattern: SSH_DOMAIN=gitea\.example\.com
- it: renders data, not stringData, so removed sections are pruned on upgrade
- it: "Render data instead of stringData so removed sections are pruned on upgrade"
asserts:
- documentIndex: 0
notExists:
+4 -4
View File
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: renders openshift-compatible defaults for chart-managed containers
- it: "Render OpenShift compatible defaults for the chart-managed containers"
template: templates/deployment.yaml
set:
openshift.enabled: true
@@ -61,7 +61,7 @@ tests:
seccompProfile:
type: RuntimeDefault
- it: does not force runAsUser 1000 for command init containers on OpenShift
- it: "Omit runAsUser 1000 for command init containers on OpenShift"
template: templates/deployment.yaml
set:
openshift.enabled: true
@@ -74,7 +74,7 @@ tests:
- notExists:
path: spec.template.spec.initContainers[3].securityContext.runAsUser
- it: preserves explicit pod and container security context overrides on OpenShift
- it: "Preserve explicit pod and container security context overrides on OpenShift"
template: templates/deployment.yaml
set:
openshift:
@@ -102,7 +102,7 @@ tests:
path: spec.template.spec.containers[0].securityContext.runAsGroup
value: 1000620000
- it: renders an explicit hostUsers=false override on OpenShift
- it: "Render an explicit hostUsers=false override on OpenShift"
template: templates/deployment.yaml
set:
openshift:
+10 -10
View File
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: renders default liveness probe
- it: "Render the default liveness probe"
template: templates/deployment.yaml
asserts:
- notExists:
@@ -26,7 +26,7 @@ tests:
tcpSocket:
port: http
timeoutSeconds: 1
- it: renders default readiness probe
- it: "Render the default readiness probe"
template: templates/deployment.yaml
asserts:
- notExists:
@@ -41,12 +41,12 @@ tests:
tcpSocket:
port: http
timeoutSeconds: 1
- it: does not render a default startup probe
- it: "Skip the startup probe by default"
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.containers[0].startupProbe
- it: allows enabling a startup probe
- it: "Render the startup probe when it is enabled"
template: templates/deployment.yaml
set:
gitea.startupProbe.enabled: true
@@ -64,7 +64,7 @@ tests:
port: http
timeoutSeconds: 1
- it: allows overwriting the default port of the liveness probe
- it: "Overwrite the default port of the liveness probe"
template: templates/deployment.yaml
set:
gitea:
@@ -78,7 +78,7 @@ tests:
tcpSocket:
port: my-port
- it: allows overwriting the default port of the readiness probe
- it: "Overwrite the default port of the readiness probe"
template: templates/deployment.yaml
set:
gitea:
@@ -92,7 +92,7 @@ tests:
tcpSocket:
port: my-port
- it: allows overwriting the default port of the startup probe
- it: "Overwrite the default port of the startup probe"
template: templates/deployment.yaml
set:
gitea:
@@ -107,7 +107,7 @@ tests:
tcpSocket:
port: my-port
- it: allows using a non-default method as liveness probe
- it: "Use a non-default method as liveness probe"
template: templates/deployment.yaml
set:
gitea:
@@ -135,7 +135,7 @@ tests:
port: http
timeoutSeconds: 13372
- it: allows using a non-default method as readiness probe
- it: "Use a non-default method as readiness probe"
template: templates/deployment.yaml
set:
gitea:
@@ -163,7 +163,7 @@ tests:
port: http
timeoutSeconds: 13372
- it: allows using a non-default method as startup probe
- it: "Use a non-default method as startup probe"
template: templates/deployment.yaml
set:
gitea:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: supports adding a sidecar container
- it: "Render an additional sidecar container"
template: templates/deployment.yaml
set:
extraContainers:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: skips gpg init container
- it: "Skip the gpg init container"
template: templates/deployment.yaml
asserts:
- notContains:
@@ -19,7 +19,7 @@ tests:
any: true
content:
name: configure-gpg
- it: skips gpg env in `init-directories` init container
- it: "Skip the gpg env of the `init-directories` init container"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: false
@@ -28,14 +28,14 @@ tests:
path: spec.template.spec.initContainers[0].env
content:
name: GNUPGHOME
- it: skips gpg env in runtime container
- it: "Skip the gpg env of the runtime container"
template: templates/deployment.yaml
asserts:
- notContains:
path: spec.template.spec.containers[0].env
content:
name: GNUPGHOME
- it: skips gpg volume spec
- it: "Skip the gpg volume spec"
template: templates/deployment.yaml
asserts:
- notContains:
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: adds gpg init container
- it: "Add the gpg init container"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -48,7 +48,7 @@ tests:
- name: gpg-private-key
mountPath: /raw
readOnly: true
- it: adds gpg env in `init-directories` init container
- it: "Add the gpg env to the `init-directories` init container"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -63,7 +63,7 @@ tests:
secretKeyRef:
name: custom-gpg-secret
key: gpgHome
- it: adds gpg env in runtime container
- it: "Add the gpg env to the runtime container"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -78,7 +78,7 @@ tests:
secretKeyRef:
name: custom-gpg-secret
key: gpgHome
- it: reads the gpg home from the configured key of an existing secret
- it: "Read the gpg home from the configured key of an existing Secret"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -94,7 +94,7 @@ tests:
secretKeyRef:
name: custom-gpg-secret
key: custom-gpg-home
- it: adds gpg volume spec
- it: "Add the gpg volume spec"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -110,7 +110,7 @@ tests:
- key: privateKey
path: private.asc
defaultMode: 0100
- it: supports gpg volume spec with external reference
- it: "Render the gpg volume spec with an external reference"
template: templates/deployment.yaml
set:
secrets.gpg.enabled: true
@@ -11,7 +11,7 @@ templates:
- templates/secret_inlineConfig.yaml
- templates/secret_metrics.yaml
tests:
- it: supports defining SSH log level for root based image
- it: "Define the SSH log level for the root based image"
template: templates/deployment.yaml
set:
deployment.gitea.image.rootless: false
@@ -21,7 +21,7 @@ tests:
content:
name: SSH_LOG_LEVEL
value: "INFO"
- it: supports overriding SSH log level
- it: "Override the SSH log level"
template: templates/deployment.yaml
set:
deployment.gitea.image.rootless: false
@@ -32,7 +32,7 @@ tests:
content:
name: SSH_LOG_LEVEL
value: "DEBUG"
- it: supports overriding SSH log level (even when image.fullOverride set)
- it: "Override the SSH log level when image.fullOverride is set"
template: templates/deployment.yaml
set:
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
@@ -44,7 +44,7 @@ tests:
content:
name: SSH_LOG_LEVEL
value: "DEBUG"
- it: skips SSH_LOG_LEVEL for rootless image
- it: "Skip SSH_LOG_LEVEL for the rootless image"
template: templates/deployment.yaml
set:
deployment.gitea.image.rootless: true
@@ -55,7 +55,7 @@ tests:
any: true
content:
name: SSH_LOG_LEVEL
- it: skips SSH_LOG_LEVEL for rootless image (even when image.fullOverride set)
- it: "Skip SSH_LOG_LEVEL for the rootless image when image.fullOverride is set"
template: templates/deployment.yaml
set:
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
@@ -7,7 +7,7 @@ suite: Storage class configuration tests
templates:
- templates/persistentVolumeClaim.yaml
tests:
- it: Set storageClassName when persistence.new.storageClassName is defined
- it: "Render the storageClassName when persistence.new.storageClassName is defined"
set:
persistence.enabled: true
persistence.new.storageClassName: my-storage-class
@@ -6,7 +6,7 @@ templates:
- templates/service_ssh.yaml
- templates/service_http.yaml
tests:
- it: supports adding custom labels to sshService
- it: "Add custom labels to the SSH Service"
template: templates/service_ssh.yaml
set:
service:
@@ -18,7 +18,7 @@ tests:
path: metadata.labels["gitea/testkey"]
value: "testvalue"
- it: keeps existing labels (ssh)
- it: "Keep the existing labels of the SSH Service"
template: templates/service_ssh.yaml
set:
service:
@@ -28,7 +28,7 @@ tests:
- exists:
path: metadata.labels["app"]
- it: supports adding custom labels to httpService
- it: "Add custom labels to the HTTP Service"
template: templates/service_http.yaml
set:
service:
@@ -40,7 +40,7 @@ tests:
path: metadata.labels["gitea/testkey"]
value: "testvalue"
- it: keeps existing labels (http)
- it: "Keep the existing labels of the HTTP Service"
template: templates/service_http.yaml
set:
service:
@@ -50,7 +50,7 @@ tests:
- exists:
path: metadata.labels["app"]
- it: render service.ssh.loadBalancerClass if set and type is LoadBalancer
- it: "Render service.ssh.loadBalancerClass when the type is LoadBalancer"
template: templates/service_ssh.yaml
set:
service:
@@ -72,7 +72,7 @@ tests:
path: spec.loadBalancerSourceRanges
value: ["1.2.3.4/32", "5.6.7.8/32"]
- it: does not render when loadbalancer properties are set but type is not loadBalancerClass
- it: "Skip the loadBalancer properties when the type is not LoadBalancer"
template: templates/service_http.yaml
set:
service:
@@ -91,7 +91,7 @@ tests:
- notExists:
path: spec.loadBalancerSourceRanges
- it: does not render loadBalancerClass by default even when type is LoadBalancer
- it: "Skip loadBalancerClass by default even when the type is LoadBalancer"
template: templates/service_http.yaml
set:
service:
@@ -105,7 +105,7 @@ tests:
path: spec.loadBalancerIP
value: "1.2.3.4"
- it: both ssh and http services exist
- it: "Render both the SSH and the HTTP Service"
templates:
- templates/service_ssh.yaml
- templates/service_http.yaml