diff --git a/unittests/helm/admin-secret/admin.yaml b/unittests/helm/admin-secret/admin.yaml index 8b04eb4..a52cb41 100644 --- a/unittests/helm/admin-secret/admin.yaml +++ b/unittests/helm/admin-secret/admin.yaml @@ -5,14 +5,14 @@ release: templates: - templates/secret_admin.yaml tests: - - it: skips rendering when the admin user is disabled + - it: "Skip rendering when the admin user is disabled" set: secrets.admin.enabled: false asserts: - hasDocuments: count: 0 - - it: skips rendering using an existing secret reference + - it: "Skip rendering when an existing Secret is referenced" set: secrets.admin.enabled: true secrets.admin.existingSecret.enabled: true @@ -21,14 +21,14 @@ tests: - hasDocuments: count: 0 - - it: fails rendering without credentials + - it: "Fail when no credentials are configured" set: secrets.admin.new.password: "" asserts: - failedTemplate: errorMessage: Either specify `secrets.admin.new.username` and `secrets.admin.new.password` or reference an existing Secret via `secrets.admin.existingSecret` - - it: renders the secret specification with the default credentials + - it: "Render the Secret with the default credentials" asserts: - hasDocuments: count: 1 @@ -49,7 +49,7 @@ tests: path: data.username value: "Z2l0ZWFfYWRtaW4=" - - it: supports custom annotations and labels + - it: "Render custom annotations and labels" set: secrets.admin.new.annotations: custom-annotation: annotation-value diff --git a/unittests/helm/config/actions-config.yaml b/unittests/helm/config/actions-config.yaml index c1aede2..66931b9 100644 --- a/unittests/helm/config/actions-config.yaml +++ b/unittests/helm/config/actions-config.yaml @@ -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 diff --git a/unittests/helm/config/cache-config.yaml b/unittests/helm/config/cache-config.yaml index 0fdc3d7..69e81a2 100644 --- a/unittests/helm/config/cache-config.yaml +++ b/unittests/helm/config/cache-config.yaml @@ -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: diff --git a/unittests/helm/config/config-environment-script.yaml b/unittests/helm/config/config-environment-script.yaml index 03bf2f8..def7676 100644 --- a/unittests/helm/config/config-environment-script.yaml +++ b/unittests/helm/config/config-environment-script.yaml @@ -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 diff --git a/unittests/helm/config/metrics-section_metrics-token.yaml b/unittests/helm/config/metrics-section_metrics-token.yaml index 7062488..64ddd5f 100644 --- a/unittests/helm/config/metrics-section_metrics-token.yaml +++ b/unittests/helm/config/metrics-section_metrics-token.yaml @@ -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: diff --git a/unittests/helm/config/queue-config.yaml b/unittests/helm/config/queue-config.yaml index 40f3e95..88c477f 100644 --- a/unittests/helm/config/queue-config.yaml +++ b/unittests/helm/config/queue-config.yaml @@ -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: diff --git a/unittests/helm/config/server-section_domain.yaml b/unittests/helm/config/server-section_domain.yaml index ead24f1..1f8ec3d 100644 --- a/unittests/helm/config/server-section_domain.yaml +++ b/unittests/helm/config/server-section_domain.yaml @@ -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: diff --git a/unittests/helm/config/session-config.yaml b/unittests/helm/config/session-config.yaml index e54f27d..3e58beb 100644 --- a/unittests/helm/config/session-config.yaml +++ b/unittests/helm/config/session-config.yaml @@ -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: diff --git a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml index d9c77c2..7453974 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql-ha.yaml @@ -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 diff --git a/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml b/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml index aae0a63..ba9b2b2 100644 --- a/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-postgresql.yaml @@ -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 diff --git a/unittests/helm/dependency-checks/customization-integrity-valkey.yaml b/unittests/helm/dependency-checks/customization-integrity-valkey.yaml index 696fad4..79fae74 100644 --- a/unittests/helm/dependency-checks/customization-integrity-valkey.yaml +++ b/unittests/helm/dependency-checks/customization-integrity-valkey.yaml @@ -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 diff --git a/unittests/helm/dependency-checks/major-image-bump.yaml b/unittests/helm/dependency-checks/major-image-bump.yaml index f5d35af..54e3d61 100644 --- a/unittests/helm/dependency-checks/major-image-bump.yaml +++ b/unittests/helm/dependency-checks/major-image-bump.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: diff --git a/unittests/helm/deployment/HA.yaml b/unittests/helm/deployment/HA.yaml index 6a7cbc3..9b7fe36 100644 --- a/unittests/helm/deployment/HA.yaml +++ b/unittests/helm/deployment/HA.yaml @@ -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: diff --git a/unittests/helm/deployment/admin.yaml b/unittests/helm/deployment/admin.yaml index 4187a14..55ad8f2 100644 --- a/unittests/helm/deployment/admin.yaml +++ b/unittests/helm/deployment/admin.yaml @@ -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 diff --git a/unittests/helm/deployment/basic.yaml b/unittests/helm/deployment/basic.yaml index ed40047..2472f17 100644 --- a/unittests/helm/deployment/basic.yaml +++ b/unittests/helm/deployment/basic.yaml @@ -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: diff --git a/unittests/helm/deployment/checksum-annotations.yaml b/unittests/helm/deployment/checksum-annotations.yaml index 38f1c7f..f5807fc 100644 --- a/unittests/helm/deployment/checksum-annotations.yaml +++ b/unittests/helm/deployment/checksum-annotations.yaml @@ -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 diff --git a/unittests/helm/deployment/deployment-additional-config.yaml b/unittests/helm/deployment/deployment-additional-config.yaml index 32fb78e..7ca009e 100644 --- a/unittests/helm/deployment/deployment-additional-config.yaml +++ b/unittests/helm/deployment/deployment-additional-config.yaml @@ -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 diff --git a/unittests/helm/deployment/deprecations.yaml b/unittests/helm/deployment/deprecations.yaml index cabc14a..809c42d 100644 --- a/unittests/helm/deployment/deprecations.yaml +++ b/unittests/helm/deployment/deprecations.yaml @@ -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..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..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: diff --git a/unittests/helm/deployment/extraEnvSourceFile.yaml b/unittests/helm/deployment/extraEnvSourceFile.yaml index dbfc8e7..c957616 100644 --- a/unittests/helm/deployment/extraEnvSourceFile.yaml +++ b/unittests/helm/deployment/extraEnvSourceFile.yaml @@ -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: diff --git a/unittests/helm/deployment/extraInitContainers.yaml b/unittests/helm/deployment/extraInitContainers.yaml index e749417..bc40e25 100644 --- a/unittests/helm/deployment/extraInitContainers.yaml +++ b/unittests/helm/deployment/extraInitContainers.yaml @@ -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: diff --git a/unittests/helm/deployment/image-configuration.yaml b/unittests/helm/deployment/image-configuration.yaml index d913330..951e75f 100644 --- a/unittests/helm/deployment/image-configuration.yaml +++ b/unittests/helm/deployment/image-configuration.yaml @@ -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" diff --git a/unittests/helm/deployment/initContainerConfiguration.yaml b/unittests/helm/deployment/initContainerConfiguration.yaml index dea7868..9bc4774 100644 --- a/unittests/helm/deployment/initContainerConfiguration.yaml +++ b/unittests/helm/deployment/initContainerConfiguration.yaml @@ -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: diff --git a/unittests/helm/deployment/inline-config.yaml b/unittests/helm/deployment/inline-config.yaml index c07a97a..81d9ba3 100644 --- a/unittests/helm/deployment/inline-config.yaml +++ b/unittests/helm/deployment/inline-config.yaml @@ -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: diff --git a/unittests/helm/deployment/openshift.yaml b/unittests/helm/deployment/openshift.yaml index d618b42..d6b2327 100644 --- a/unittests/helm/deployment/openshift.yaml +++ b/unittests/helm/deployment/openshift.yaml @@ -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: diff --git a/unittests/helm/deployment/probes.yaml b/unittests/helm/deployment/probes.yaml index 6a617b0..2df3c7b 100644 --- a/unittests/helm/deployment/probes.yaml +++ b/unittests/helm/deployment/probes.yaml @@ -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: diff --git a/unittests/helm/deployment/sidecar-container.yaml b/unittests/helm/deployment/sidecar-container.yaml index cf5bfae..77ed586 100644 --- a/unittests/helm/deployment/sidecar-container.yaml +++ b/unittests/helm/deployment/sidecar-container.yaml @@ -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: diff --git a/unittests/helm/deployment/signing-disabled.yaml b/unittests/helm/deployment/signing-disabled.yaml index 7f6c7ef..b4d04fb 100644 --- a/unittests/helm/deployment/signing-disabled.yaml +++ b/unittests/helm/deployment/signing-disabled.yaml @@ -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: diff --git a/unittests/helm/deployment/signing-enabled.yaml b/unittests/helm/deployment/signing-enabled.yaml index ef83466..7b6d924 100644 --- a/unittests/helm/deployment/signing-enabled.yaml +++ b/unittests/helm/deployment/signing-enabled.yaml @@ -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 diff --git a/unittests/helm/deployment/ssh-configuration.yaml b/unittests/helm/deployment/ssh-configuration.yaml index 916d7b4..e1705a4 100644 --- a/unittests/helm/deployment/ssh-configuration.yaml +++ b/unittests/helm/deployment/ssh-configuration.yaml @@ -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 diff --git a/unittests/helm/deployment/storage-class-configuration.yaml b/unittests/helm/deployment/storage-class-configuration.yaml index 21fd06a..4ca6360 100644 --- a/unittests/helm/deployment/storage-class-configuration.yaml +++ b/unittests/helm/deployment/storage-class-configuration.yaml @@ -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 diff --git a/unittests/helm/deployment/svc-configuration.yaml b/unittests/helm/deployment/svc-configuration.yaml index aa9a87b..0ef319f 100644 --- a/unittests/helm/deployment/svc-configuration.yaml +++ b/unittests/helm/deployment/svc-configuration.yaml @@ -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 diff --git a/unittests/helm/gatewayAPI/backendTLSPolicy.yaml b/unittests/helm/gatewayAPI/backendTLSPolicy.yaml index e171b84..e87968c 100644 --- a/unittests/helm/gatewayAPI/backendTLSPolicy.yaml +++ b/unittests/helm/gatewayAPI/backendTLSPolicy.yaml @@ -5,7 +5,7 @@ release: templates: - templates/backendTLSPolicy.yaml tests: - - it: should not render when gatewayAPI.enabled is false + - it: "Skip rendering when gatewayAPI.enabled is false" set: gatewayAPI: enabled: false @@ -22,7 +22,7 @@ tests: - hasDocuments: count: 0 - - it: should not render when backendTLSPolicy.enabled is false + - it: "Skip rendering when backendTLSPolicy.enabled is false" set: gatewayAPI: enabled: true @@ -31,7 +31,7 @@ tests: - hasDocuments: count: 0 - - it: should render a BackendTLSPolicy targeting the http Service by default + - it: "Render a BackendTLSPolicy targeting the HTTP Service by default" set: gatewayAPI: enabled: true @@ -65,7 +65,7 @@ tests: path: spec.validation.hostname value: git.internal - - it: should fail when validation is missing + - it: "Fail when the validation is missing" set: gatewayAPI: enabled: true @@ -76,7 +76,7 @@ tests: - failedTemplate: errorMessage: gatewayAPI.core.backendTLSPolicy.validation is required - - it: should fail when validation is an empty dict + - it: "Fail when the validation is an empty dict" set: gatewayAPI: enabled: true diff --git a/unittests/helm/gatewayAPI/clientSettingsPolicy.yaml b/unittests/helm/gatewayAPI/clientSettingsPolicy.yaml index 8fe3d40..1add54d 100644 --- a/unittests/helm/gatewayAPI/clientSettingsPolicy.yaml +++ b/unittests/helm/gatewayAPI/clientSettingsPolicy.yaml @@ -5,7 +5,7 @@ release: templates: - templates/clientSettingsPolicy.yaml tests: - - it: should not render when gatewayAPI.enabled is false + - it: "Skip rendering when gatewayAPI.enabled is false" set: gatewayAPI: enabled: false @@ -18,7 +18,7 @@ tests: - hasDocuments: count: 0 - - it: should not render when clientSettingsPolicies.enabled is false + - it: "Skip rendering when clientSettingsPolicies.enabled is false" set: gatewayAPI: enabled: true @@ -27,7 +27,7 @@ tests: - hasDocuments: count: 0 - - it: should render a ClientSettingsPolicy targeting the HTTPRoute by default + - it: "Render a ClientSettingsPolicy targeting the HTTPRoute by default" set: gatewayAPI: enabled: true @@ -60,7 +60,7 @@ tests: path: spec.body.maxSize value: 100m - - it: should honor a custom targetRef + - it: "Render a custom targetRef" set: gatewayAPI: enabled: true @@ -81,7 +81,7 @@ tests: path: spec.targetRef.name value: shared-gateway - - it: should fail when body is missing + - it: "Fail when the body is missing" set: gatewayAPI: enabled: true @@ -92,7 +92,7 @@ tests: - failedTemplate: errorMessage: gatewayAPI.nginx.clientSettingsPolicies.body is required - - it: should fail when body is an empty dict + - it: "Fail when the body is an empty dict" set: gatewayAPI: enabled: true diff --git a/unittests/helm/gatewayAPI/httpRoute.yaml b/unittests/helm/gatewayAPI/httpRoute.yaml index 4793964..cfd69b9 100644 --- a/unittests/helm/gatewayAPI/httpRoute.yaml +++ b/unittests/helm/gatewayAPI/httpRoute.yaml @@ -5,7 +5,7 @@ release: templates: - templates/httpRoute.yaml tests: - - it: should not render when gatewayAPI.enabled is false + - it: "Skip rendering when gatewayAPI.enabled is false" set: gatewayAPI: enabled: false @@ -20,7 +20,7 @@ tests: - hasDocuments: count: 0 - - it: should not render when httpRoute.enabled is false + - it: "Skip rendering when httpRoute.enabled is false" set: gatewayAPI: enabled: true @@ -29,7 +29,7 @@ tests: - hasDocuments: count: 0 - - it: should render a single HTTPRoute with default rule + - it: "Render a single HTTPRoute with the default rule" set: gatewayAPI: enabled: true @@ -85,7 +85,7 @@ tests: path: spec.rules[0].backendRefs[0].weight value: 1 - - it: should fail when parentRefs missing + - it: "Fail when the parentRefs are missing" set: gatewayAPI: enabled: true @@ -98,7 +98,7 @@ tests: - failedTemplate: errorMessage: gatewayAPI.core.httpRoute.parentRefs is required - - it: hostname tpl rendering + - it: "Render the hostnames via tpl" set: global: giteaHostName: gitea.tpl.example.com diff --git a/unittests/helm/gatewayAPI/tcpRoute.yaml b/unittests/helm/gatewayAPI/tcpRoute.yaml index 12f6dd4..1e94a80 100644 --- a/unittests/helm/gatewayAPI/tcpRoute.yaml +++ b/unittests/helm/gatewayAPI/tcpRoute.yaml @@ -5,7 +5,7 @@ release: templates: - templates/tcpRoute.yaml tests: - - it: should not render when gatewayAPI.enabled is false + - it: "Skip rendering when gatewayAPI.enabled is false" set: gatewayAPI: enabled: false @@ -18,7 +18,7 @@ tests: - hasDocuments: count: 0 - - it: should not render when tcpRoute.enabled is false + - it: "Skip rendering when tcpRoute.enabled is false" set: gatewayAPI: enabled: true @@ -27,7 +27,7 @@ tests: - hasDocuments: count: 0 - - it: should render a TCPRoute defaulting to the SSH service + - it: "Render a TCPRoute defaulting to the SSH Service" set: gatewayAPI: enabled: true @@ -67,7 +67,7 @@ tests: path: spec.rules[0].backendRefs[0].weight value: 1 - - it: should fail when parentRefs missing + - it: "Fail when the parentRefs are missing" set: gatewayAPI: enabled: true diff --git a/unittests/helm/gpg-secret/signing-disabled.yaml b/unittests/helm/gpg-secret/signing-disabled.yaml index d49c034..c87e42a 100644 --- a/unittests/helm/gpg-secret/signing-disabled.yaml +++ b/unittests/helm/gpg-secret/signing-disabled.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_gpg.yaml tests: - - it: renders nothing + - it: "Skip rendering when signing is disabled" set: secrets.gpg.enabled: false asserts: diff --git a/unittests/helm/gpg-secret/signing-enabled.yaml b/unittests/helm/gpg-secret/signing-enabled.yaml index b97a4c4..0b3e097 100644 --- a/unittests/helm/gpg-secret/signing-enabled.yaml +++ b/unittests/helm/gpg-secret/signing-enabled.yaml @@ -5,13 +5,13 @@ release: templates: - templates/secret_gpg.yaml tests: - - it: fails rendering when nothing is configured + - it: "Fail when no gpg key is configured" set: secrets.gpg.enabled: true asserts: - failedTemplate: errorMessage: Either specify `secrets.gpg.new.privateKey` or reference an existing Secret via `secrets.gpg.existingSecret` - - it: skips rendering using external secret reference + - it: "Skip rendering when an existing Secret is referenced" set: secrets.gpg.enabled: true secrets.gpg.existingSecret.enabled: true @@ -19,7 +19,7 @@ tests: asserts: - hasDocuments: count: 0 - - it: renders secret specification using inline gpg key + - it: "Render the Secret with an inline gpg key" set: secrets.gpg.enabled: true secrets.gpg.new.privateKey: "gpg-key-placeholder" diff --git a/unittests/helm/init/basic.yaml b/unittests/helm/init/basic.yaml index 94b2905..9b65624 100644 --- a/unittests/helm/init/basic.yaml +++ b/unittests/helm/init/basic.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_init.yaml tests: - - it: renders a secret + - it: "Render the Secret" asserts: - hasDocuments: count: 1 diff --git a/unittests/helm/init/init_directory_structure.sh-rootless.yaml b/unittests/helm/init/init_directory_structure.sh-rootless.yaml index 915bfd8..5acb5fd 100644 --- a/unittests/helm/init/init_directory_structure.sh-rootless.yaml +++ b/unittests/helm/init/init_directory_structure.sh-rootless.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_init.yaml tests: - - it: runs gpg in batch mode + - it: "Run gpg in batch mode" set: secrets.gpg.enabled: true secrets.gpg.new.privateKey: |- @@ -21,7 +21,7 @@ tests: set -eu gpg --batch --import "$TMP_RAW_GPG_KEY" - - it: skips gpg script block for disabled signing + - it: "Skip the gpg script block when signing is disabled" asserts: - equal: path: data["init_directory_structure.sh"] @@ -37,7 +37,7 @@ tests: # prepare temp directory structure mkdir -pv "${GITEA_TEMP}" chmod -v ug+rwx "${GITEA_TEMP}" - - it: adds gpg script block for enabled signing + - it: "Add the gpg script block when signing is enabled" set: secrets.gpg.enabled: true secrets.gpg.new.privateKey: |- @@ -65,7 +65,7 @@ tests: chmod -v 700 "${GNUPGHOME}" chown -v 1000:1000 "${GNUPGHOME}" fi - - it: it does not chown /data even when image.fullOverride is set + - it: "Skip the chown of /data even when image.fullOverride is set" template: templates/secret_init.yaml set: deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5 @@ -84,7 +84,7 @@ tests: # prepare temp directory structure mkdir -pv "${GITEA_TEMP}" chmod -v ug+rwx "${GITEA_TEMP}" - - 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" asserts: - notExists: path: stringData diff --git a/unittests/helm/init/init_directory_structure.sh.yaml b/unittests/helm/init/init_directory_structure.sh.yaml index c819cd9..e40d5e2 100644 --- a/unittests/helm/init/init_directory_structure.sh.yaml +++ b/unittests/helm/init/init_directory_structure.sh.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_init.yaml tests: - - it: runs gpg in batch mode + - it: "Run gpg in batch mode" set: deployment.gitea.image.rootless: false secrets.gpg.enabled: true @@ -22,7 +22,7 @@ tests: set -eu gpg --batch --import "$TMP_RAW_GPG_KEY" - - it: skips gpg script block for disabled signing + - it: "Skip the gpg script block when signing is disabled" set: deployment.gitea.image.rootless: false asserts: @@ -42,7 +42,7 @@ tests: mkdir -pv "${GITEA_TEMP}" chown -v 1000:1000 "${GITEA_TEMP}" chmod -v ug+rwx "${GITEA_TEMP}" - - it: adds gpg script block for enabled signing + - it: "Add the gpg script block when signing is enabled" set: deployment.gitea.image.rootless: false secrets.gpg.enabled: true @@ -73,7 +73,7 @@ tests: chmod -v 700 "${GNUPGHOME}" chown -v 1000:1000 "${GNUPGHOME}" fi - - 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" set: deployment.gitea.image.rootless: false asserts: diff --git a/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml b/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml index 398c000..4db3fce 100644 --- a/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml +++ b/unittests/helm/metric-secret/metrics-secret-servicemonitor-disabled.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_metrics.yaml tests: - - it: renders nothing if monitoring disabled and gitea.metrics.token empty + - it: "Skip rendering when monitoring is disabled and gitea.metrics.token is empty" set: gitea.metrics.enabled: false gitea.metrics.serviceMonitor.enabled: false @@ -13,7 +13,7 @@ tests: asserts: - hasDocuments: count: 0 - - it: renders nothing if monitoring disabled and gitea.metrics.token not empty + - it: "Skip rendering when monitoring is disabled and gitea.metrics.token is not empty" set: gitea.metrics.enabled: false gitea.metrics.serviceMonitor.enabled: false diff --git a/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml b/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml index 570ed73..1633db0 100644 --- a/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml +++ b/unittests/helm/metric-secret/metrics-secret-servicemonitor-enabled.yaml @@ -5,7 +5,7 @@ release: templates: - templates/secret_metrics.yaml tests: - - it: renders nothing if monitoring enabled and gitea.metrics.token empty + - it: "Skip rendering when monitoring is enabled and gitea.metrics.token is empty" set: gitea.metrics.enabled: true gitea.metrics.serviceMonitor.enabled: true @@ -13,7 +13,7 @@ tests: asserts: - hasDocuments: count: 0 - - it: renders Secret if monitoring enabled and gitea.metrics.token not empty + - it: "Render the Secret when monitoring is enabled and gitea.metrics.token is not empty" set: gitea.metrics.enabled: true gitea.metrics.serviceMonitor.enabled: true diff --git a/unittests/helm/route/basic.yaml b/unittests/helm/route/basic.yaml index bc473fe..96891d0 100644 --- a/unittests/helm/route/basic.yaml +++ b/unittests/helm/route/basic.yaml @@ -5,7 +5,7 @@ release: templates: - templates/route.yaml tests: - - it: should create route when route.enabled is true + - it: "Render the Route when route.enabled is true" set: route: enabled: true @@ -50,7 +50,7 @@ tests: path: spec.tls.insecureEdgeTerminationPolicy value: Redirect - - it: should not create route when route.enabled is false + - it: "Skip rendering when route.enabled is false" set: route.enabled: false asserts: diff --git a/unittests/helm/servicemonitor/basic.yaml b/unittests/helm/servicemonitor/basic.yaml index 5d67ec6..433a2d2 100644 --- a/unittests/helm/servicemonitor/basic.yaml +++ b/unittests/helm/servicemonitor/basic.yaml @@ -5,23 +5,23 @@ release: templates: - templates/serviceMonitor.yaml tests: - - it: skips rendering by default + - it: "Skip rendering by default" asserts: - hasDocuments: count: 0 - - it: renders default ServiceMonitor object with gitea.metrics.enabled=true + - it: "Render the ServiceMonitor when gitea.metrics.enabled is true" set: gitea.metrics.enabled: true asserts: - hasDocuments: count: 0 - - it: renders default ServiceMonitor object with gitea.metrics.serviceMonitor.enabled=true + - it: "Render the ServiceMonitor when gitea.metrics.serviceMonitor.enabled is true" set: gitea.metrics.serviceMonitor.enabled: true asserts: - hasDocuments: count: 0 - - it: renders defaults + - it: "Render the default ServiceMonitor spec" set: gitea.metrics.enabled: true gitea.metrics.serviceMonitor.enabled: true @@ -45,7 +45,7 @@ tests: path: spec.endpoints[0].scrapeTimeout - notExists: path: spec.endpoints[0].tlsConfig - - it: renders custom scrape interval + - it: "Render a custom scrape interval" set: gitea.metrics.enabled: true gitea.metrics.serviceMonitor.enabled: true @@ -58,7 +58,7 @@ tests: - equal: path: spec.endpoints[0].scrapeTimeout value: 5s - - it: renders custom tls config + - it: "Render a custom tls config" set: gitea.metrics.enabled: true gitea.metrics.serviceMonitor.enabled: true diff --git a/unittests/helm/servicemonitor/servicemonitor-disabled.yaml b/unittests/helm/servicemonitor/servicemonitor-disabled.yaml index 3df211a..e7b345a 100644 --- a/unittests/helm/servicemonitor/servicemonitor-disabled.yaml +++ b/unittests/helm/servicemonitor/servicemonitor-disabled.yaml @@ -5,7 +5,7 @@ release: templates: - templates/serviceMonitor.yaml tests: - - it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token empty + - it: "Skip rendering when the ServiceMonitor is disabled and gitea.metrics.token is empty" set: gitea.metrics.enabled: false gitea.metrics.token: "" @@ -13,7 +13,7 @@ tests: asserts: - hasDocuments: count: 0 - - it: renders nothing if gitea.metrics.serviceMonitor disabled and gitea.metrics.token not empty + - it: "Skip rendering when the ServiceMonitor is disabled and gitea.metrics.token is not empty" set: gitea.metrics.enabled: false gitea.metrics.token: "test-token" diff --git a/unittests/helm/servicemonitor/servicemonitor-enabled.yaml b/unittests/helm/servicemonitor/servicemonitor-enabled.yaml index 245ff90..1e1dbd5 100644 --- a/unittests/helm/servicemonitor/servicemonitor-enabled.yaml +++ b/unittests/helm/servicemonitor/servicemonitor-enabled.yaml @@ -5,7 +5,7 @@ release: templates: - templates/serviceMonitor.yaml tests: - - it: renders unsecure ServiceMonitor if gitea.metrics.token nil + - it: "Render an unsecured ServiceMonitor when gitea.metrics.token is nil" set: gitea.metrics.enabled: true gitea.metrics.token: @@ -24,7 +24,7 @@ tests: path: spec.endpoints value: - port: http - - it: renders unsecure ServiceMonitor if gitea.metrics.token empty + - it: "Render an unsecured ServiceMonitor when gitea.metrics.token is empty" set: gitea.metrics.enabled: true gitea.metrics.token: "" @@ -43,7 +43,7 @@ tests: path: spec.endpoints value: - port: http - - it: renders secure ServiceMonitor if gitea.metrics.token not empty + - it: "Render a secured ServiceMonitor when gitea.metrics.token is not empty" set: gitea.metrics.enabled: true gitea.metrics.token: "test-token"