test: normalize the titles of the helm unit tests
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:
@@ -5,14 +5,14 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_admin.yaml
|
- templates/secret_admin.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: skips rendering when the admin user is disabled
|
- it: "Skip rendering when the admin user is disabled"
|
||||||
set:
|
set:
|
||||||
secrets.admin.enabled: false
|
secrets.admin.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: skips rendering using an existing secret reference
|
- it: "Skip rendering when an existing Secret is referenced"
|
||||||
set:
|
set:
|
||||||
secrets.admin.enabled: true
|
secrets.admin.enabled: true
|
||||||
secrets.admin.existingSecret.enabled: true
|
secrets.admin.existingSecret.enabled: true
|
||||||
@@ -21,14 +21,14 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: fails rendering without credentials
|
- it: "Fail when no credentials are configured"
|
||||||
set:
|
set:
|
||||||
secrets.admin.new.password: ""
|
secrets.admin.new.password: ""
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: Either specify `secrets.admin.new.username` and `secrets.admin.new.password` or reference an existing Secret via `secrets.admin.existingSecret`
|
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:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 1
|
count: 1
|
||||||
@@ -49,7 +49,7 @@ tests:
|
|||||||
path: data.username
|
path: data.username
|
||||||
value: "Z2l0ZWFfYWRtaW4="
|
value: "Z2l0ZWFfYWRtaW4="
|
||||||
|
|
||||||
- it: supports custom annotations and labels
|
- it: "Render custom annotations and labels"
|
||||||
set:
|
set:
|
||||||
secrets.admin.new.annotations:
|
secrets.admin.new.annotations:
|
||||||
custom-annotation: annotation-value
|
custom-annotation: annotation-value
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
tests:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
notExists:
|
notExists:
|
||||||
path: data.actions
|
path: data.actions
|
||||||
|
|
||||||
- it: "actions can be disabled via inline config"
|
- it: "Disable actions via the inline config"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea.config.actions.ENABLED: false
|
gitea.config.actions.ENABLED: false
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
tests:
|
||||||
- it: "cache is configured correctly for valkey"
|
- it: "Configure the cache for valkey"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
@@ -17,7 +17,7 @@ tests:
|
|||||||
ADAPTER=redis
|
ADAPTER=redis
|
||||||
HOST=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
@@ -31,7 +31,7 @@ tests:
|
|||||||
ADAPTER=memory
|
ADAPTER=memory
|
||||||
HOST=
|
HOST=
|
||||||
|
|
||||||
- it: "cache can be customized when valkey is disabled"
|
- it: "Customize the cache when valkey is disabled"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ templates:
|
|||||||
- templates/secret_admin.yaml
|
- templates/secret_admin.yaml
|
||||||
- templates/secret_config.yaml
|
- templates/secret_config.yaml
|
||||||
tests:
|
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
|
template: templates/secret_config.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -14,7 +14,7 @@ tests:
|
|||||||
path: data["config_environment.sh"]
|
path: data["config_environment.sh"]
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: 'gitea config edit-ini --apply-env --config .+GITEA_APP_INI.+ --out .+GITEA_APP_INI'
|
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
|
template: templates/secret_config.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
tests:
|
||||||
- it: metrics token is set
|
- it: "Configure the metrics token when it is set"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -18,7 +18,7 @@ tests:
|
|||||||
value: |-
|
value: |-
|
||||||
ENABLED=true
|
ENABLED=true
|
||||||
TOKEN=somepassword
|
TOKEN=somepassword
|
||||||
- it: metrics token is empty
|
- it: "Omit the metrics token when it is empty"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -32,7 +32,7 @@ tests:
|
|||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
value: |-
|
value: |-
|
||||||
ENABLED=true
|
ENABLED=true
|
||||||
- it: metrics token is nil
|
- it: "Omit the metrics token when it is nil"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -46,7 +46,7 @@ tests:
|
|||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
value: |-
|
value: |-
|
||||||
ENABLED=true
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
tests:
|
||||||
- it: "queue is configured correctly for valkey"
|
- it: "Configure the queue for valkey"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
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&
|
CONN_STR=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
||||||
TYPE=redis
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
@@ -31,7 +31,7 @@ tests:
|
|||||||
CONN_STR=
|
CONN_STR=
|
||||||
TYPE=level
|
TYPE=level
|
||||||
|
|
||||||
- it: "queue can be customized when valkey is disabled"
|
- it: "Customize the queue when valkey is disabled"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- 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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
ingress:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
gitea.config.server.DOMAIN: provided.example.com
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
route:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
route:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
ingress:
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
ingress:
|
ingress:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
tests:
|
||||||
- it: "session is configured correctly for valkey"
|
- it: "Configure the session for valkey"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
@@ -17,7 +17,7 @@ tests:
|
|||||||
PROVIDER=redis
|
PROVIDER=redis
|
||||||
PROVIDER_CONFIG=redis://:changeme@gitea-unittests-valkey.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
@@ -31,7 +31,7 @@ tests:
|
|||||||
PROVIDER=memory
|
PROVIDER=memory
|
||||||
PROVIDER_CONFIG=
|
PROVIDER_CONFIG=
|
||||||
|
|
||||||
- it: "session can be customized when valkey is disabled"
|
- it: "Customize the session when valkey is disabled"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ set:
|
|||||||
persistence:
|
persistence:
|
||||||
size: 1337Mi
|
size: 1337Mi
|
||||||
tests:
|
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
|
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -40,7 +40,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: POSTGRES_USER
|
name: POSTGRES_USER
|
||||||
value: "gitea-username"
|
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
|
template: charts/postgresql-ha/templates/postgresql/secrets.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -55,49 +55,35 @@ tests:
|
|||||||
equal:
|
equal:
|
||||||
path: data["password"]
|
path: data["password"]
|
||||||
value: "Z2l0ZWEtcGFzc3dvcmQ=" # postgresql-ha.postgresql.password is overwritten by postgresql-ha.global.postgresql.password and should not be referenced here
|
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
|
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: data["admin-password"]
|
path: data["admin-password"]
|
||||||
value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA=="
|
value: "Y3VzdG9tLXBhc3N3b3JkLXBncG9vbA=="
|
||||||
- it: "[postgresql-ha] pgpool.adminPassword is applied as expected"
|
- it: "[postgresql-ha] Apply pgpool.srCheckPassword"
|
||||||
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"
|
|
||||||
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
|
template: charts/postgresql-ha/templates/pgpool/secrets.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: data["sr-check-password"]
|
path: data["sr-check-password"]
|
||||||
value: "Y3VzdG9tLXBhc3N3b3JkLXNyLWNoZWNr"
|
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
|
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
|
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
|
||||||
value: "1337Mi"
|
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
|
template: charts/postgresql-ha/templates/pgpool/service.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: spec.ports[0].port
|
path: spec.ports[0].port
|
||||||
value: 1234
|
value: 1234
|
||||||
- it: "[postgresql-ha] renders the referenced service"
|
- it: "[postgresql-ha] Render the referenced Service"
|
||||||
template: charts/postgresql-ha/templates/pgpool/service.yaml
|
template: charts/postgresql-ha/templates/pgpool/service.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- containsDocument:
|
- containsDocument:
|
||||||
@@ -105,7 +91,7 @@ tests:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
name: gitea-unittests-postgresql-ha-pgpool
|
name: gitea-unittests-postgresql-ha-pgpool
|
||||||
namespace: testing
|
namespace: testing
|
||||||
- it: "[gitea] connects to pgpool service"
|
- it: "[gitea] Connect to the pgpool Service"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -113,7 +99,7 @@ tests:
|
|||||||
path: data.database
|
path: data.database
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.cluster.local:1234
|
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:
|
set:
|
||||||
clusterDomain: my-special-cluster.local
|
clusterDomain: my-special-cluster.local
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
@@ -123,7 +109,7 @@ tests:
|
|||||||
path: data.database
|
path: data.database
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: HOST=gitea-unittests-postgresql-ha-pgpool.testing.svc.my-special-cluster.local:1234
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ set:
|
|||||||
persistence:
|
persistence:
|
||||||
size: 1337Mi
|
size: 1337Mi
|
||||||
tests:
|
tests:
|
||||||
- it: "[postgresql] DB settings are applied as expected"
|
- it: "[postgresql] Apply the database settings"
|
||||||
template: charts/postgresql/templates/primary/statefulset.yaml
|
template: charts/postgresql/templates/primary/statefulset.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -35,28 +35,28 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: POSTGRES_USER
|
name: POSTGRES_USER
|
||||||
value: "gitea-username"
|
value: "gitea-username"
|
||||||
- it: "[postgresql] DB password is applied as expected"
|
- it: "[postgresql] Apply the database password"
|
||||||
template: charts/postgresql/templates/secrets.yaml
|
template: charts/postgresql/templates/secrets.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: data["password"]
|
path: data["password"]
|
||||||
value: "Z2l0ZWEtcGFzc3dvcmQ="
|
value: "Z2l0ZWEtcGFzc3dvcmQ="
|
||||||
- it: "[postgresql] primary.persistence.size is applied as expected"
|
- it: "[postgresql] Apply primary.persistence.size"
|
||||||
template: charts/postgresql/templates/primary/statefulset.yaml
|
template: charts/postgresql/templates/primary/statefulset.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
|
path: spec.volumeClaimTemplates[0].spec.resources.requests.storage
|
||||||
value: "1337Mi"
|
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
|
template: charts/postgresql/templates/primary/svc.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: spec.ports[0].port
|
path: spec.ports[0].port
|
||||||
value: 1234
|
value: 1234
|
||||||
- it: "[postgresql] renders the referenced service"
|
- it: "[postgresql] Render the referenced Service"
|
||||||
template: charts/postgresql/templates/primary/svc.yaml
|
template: charts/postgresql/templates/primary/svc.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- containsDocument:
|
- containsDocument:
|
||||||
@@ -64,7 +64,7 @@ tests:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
name: gitea-unittests-postgresql
|
name: gitea-unittests-postgresql
|
||||||
namespace: testing
|
namespace: testing
|
||||||
- it: "[gitea] connects to postgresql service"
|
- it: "[gitea] Connect to the postgresql Service"
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -72,7 +72,7 @@ tests:
|
|||||||
path: data.database
|
path: data.database
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: HOST=gitea-unittests-postgresql.testing.svc.cluster.local:1234
|
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:
|
set:
|
||||||
clusterDomain: my-special-cluster.local
|
clusterDomain: my-special-cluster.local
|
||||||
template: templates/secret_inlineConfig.yaml
|
template: templates/secret_inlineConfig.yaml
|
||||||
@@ -82,7 +82,7 @@ tests:
|
|||||||
path: data.database
|
path: data.database
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: HOST=gitea-unittests-postgresql.testing.svc.my-special-cluster.local:1234
|
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
|
template: templates/secret_inlineConfig.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ set:
|
|||||||
permissions: "~* &* +@all"
|
permissions: "~* &* +@all"
|
||||||
password: gitea-password
|
password: gitea-password
|
||||||
tests:
|
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
|
template: charts/valkey/templates/secret.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
equal:
|
equal:
|
||||||
path: data.default-password
|
path: data.default-password
|
||||||
value: "Z2l0ZWEtcGFzc3dvcmQ="
|
value: "Z2l0ZWEtcGFzc3dvcmQ="
|
||||||
- it: "[valkey] renders the referenced service"
|
- it: "[valkey] Render the referenced Service"
|
||||||
template: charts/valkey/templates/service.yaml
|
template: charts/valkey/templates/service.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- containsDocument:
|
- containsDocument:
|
||||||
@@ -34,7 +34,7 @@ tests:
|
|||||||
port: 6379
|
port: 6379
|
||||||
targetPort: tcp
|
targetPort: tcp
|
||||||
protocol: 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
|
template: templates/secret_init.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
@@ -42,7 +42,7 @@ tests:
|
|||||||
path: data["configure_gitea.sh"]
|
path: data["configure_gitea.sh"]
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: nc -vz -w2 gitea-unittests-valkey.testing.svc.cluster.local 6379
|
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:
|
set:
|
||||||
clusterDomain: my-special-cluster.local
|
clusterDomain: my-special-cluster.local
|
||||||
template: templates/secret_init.yaml
|
template: templates/secret_init.yaml
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ release:
|
|||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
namespace: testing
|
namespace: testing
|
||||||
tests:
|
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
|
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
postgresql:
|
postgresql:
|
||||||
@@ -16,7 +16,7 @@ tests:
|
|||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||||
pattern: bitnamilegacy/postgresql-repmgr:17.+$
|
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
|
template: charts/postgresql/templates/primary/statefulset.yaml
|
||||||
set:
|
set:
|
||||||
postgresql:
|
postgresql:
|
||||||
@@ -29,7 +29,7 @@ tests:
|
|||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||||
pattern: bitnamilegacy/postgresql:17.+$
|
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
|
template: charts/valkey/templates/deploy_valkey.yaml
|
||||||
set:
|
set:
|
||||||
valkey:
|
valkey:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
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
|
template: templates/secret_config.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -28,7 +28,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- 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'."
|
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
|
template: templates/secret_config.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -36,7 +36,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "When using multiple replicas, a RWX file system is required and persistence.new.accessModes[0] must be set to ReadWriteMany."
|
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
|
template: templates/secret_config.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -52,7 +52,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- 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)."
|
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
|
template: templates/secret_config.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: reads the admin credentials from the generated secret
|
- it: "Read the admin credentials from the generated Secret"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
@@ -44,7 +44,7 @@ tests:
|
|||||||
name: GITEA_ADMIN_PASSWORD_MODE
|
name: GITEA_ADMIN_PASSWORD_MODE
|
||||||
value: keepUpdated
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.existingSecret.enabled: true
|
secrets.admin.existingSecret.enabled: true
|
||||||
@@ -78,7 +78,7 @@ tests:
|
|||||||
key: custom-email
|
key: custom-email
|
||||||
name: custom-admin-secret
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.enabled: false
|
secrets.admin.enabled: false
|
||||||
@@ -94,7 +94,7 @@ tests:
|
|||||||
name: GITEA_ADMIN_PASSWORD_MODE
|
name: GITEA_ADMIN_PASSWORD_MODE
|
||||||
any: true
|
any: true
|
||||||
|
|
||||||
- it: fails on an unsupported password mode
|
- it: "Fail on an unsupported password mode"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.passwordMode: unsupported
|
secrets.admin.passwordMode: unsupported
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders a deployment
|
- it: "Render a Deployment"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
@@ -20,14 +20,14 @@ tests:
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
- it: renders no deployment when disabled
|
- it: "Skip rendering when the Deployment is disabled"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.enabled: false
|
deployment.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
- it: deployment labels are set
|
- it: "Render the configured Deployment labels"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.labels:
|
deployment.labels:
|
||||||
@@ -45,7 +45,7 @@ tests:
|
|||||||
path: spec.selector.matchLabels
|
path: spec.selector.matchLabels
|
||||||
content:
|
content:
|
||||||
hello: world
|
hello: world
|
||||||
- it: deployment labels are not in selector matchLabels
|
- it: "Omit the Deployment labels from the selector matchLabels"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.labels:
|
deployment.labels:
|
||||||
@@ -57,7 +57,7 @@ tests:
|
|||||||
value:
|
value:
|
||||||
app.kubernetes.io/name: gitea
|
app.kubernetes.io/name: gitea
|
||||||
app.kubernetes.io/instance: gitea-unittests
|
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
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- isSubset:
|
- isSubset:
|
||||||
@@ -67,12 +67,12 @@ tests:
|
|||||||
app.kubernetes.io/name: gitea
|
app.kubernetes.io/name: gitea
|
||||||
app.kubernetes.io/instance: gitea-unittests
|
app.kubernetes.io/instance: gitea-unittests
|
||||||
app.kubernetes.io/managed-by: Helm
|
app.kubernetes.io/managed-by: Helm
|
||||||
- it: deployment annotations are undefined
|
- it: "Omit the Deployment annotations when none are configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: metadata.annotations
|
path: metadata.annotations
|
||||||
- it: deployment annotations are set
|
- it: "Render the configured Deployment annotations"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.annotations:
|
deployment.annotations:
|
||||||
@@ -82,12 +82,12 @@ tests:
|
|||||||
path: metadata.annotations
|
path: metadata.annotations
|
||||||
value:
|
value:
|
||||||
hello: world
|
hello: world
|
||||||
- it: nodeSelector is undefined
|
- it: "Omit the nodeSelector when none is configured"
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.nodeSelector
|
path: spec.template.spec.nodeSelector
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
- it: nodeSelector is defined
|
- it: "Render the configured nodeSelector"
|
||||||
set:
|
set:
|
||||||
deployment.nodeSelector:
|
deployment.nodeSelector:
|
||||||
foo: bar
|
foo: bar
|
||||||
@@ -99,12 +99,12 @@ tests:
|
|||||||
foo: bar
|
foo: bar
|
||||||
bar: foo
|
bar: foo
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
- it: affinity is undefined
|
- it: "Omit the affinity when none is configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.affinity
|
path: spec.template.spec.affinity
|
||||||
- it: affinity is defined
|
- it: "Render the configured affinity"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.affinity:
|
deployment.affinity:
|
||||||
@@ -128,12 +128,12 @@ tests:
|
|||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- linux
|
- linux
|
||||||
- it: dnsConfig is undefined
|
- it: "Omit the dnsConfig when none is configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.dnsConfig
|
path: spec.template.spec.dnsConfig
|
||||||
- it: dnsConfig is defined
|
- it: "Render the configured dnsConfig"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.dnsConfig:
|
deployment.dnsConfig:
|
||||||
@@ -151,12 +151,12 @@ tests:
|
|||||||
options:
|
options:
|
||||||
- name: ndots
|
- name: ndots
|
||||||
value: "2"
|
value: "2"
|
||||||
- it: priorityClassName is undefined
|
- it: "Omit the priorityClassName when none is configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.priorityClassName
|
path: spec.template.spec.priorityClassName
|
||||||
- it: priorityClassName is defined
|
- it: "Render the configured priorityClassName"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.priorityClassName: high-priority
|
deployment.priorityClassName: high-priority
|
||||||
@@ -164,12 +164,12 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.priorityClassName
|
path: spec.template.spec.priorityClassName
|
||||||
value: high-priority
|
value: high-priority
|
||||||
- it: schedulerName is undefined
|
- it: "Omit the schedulerName when none is configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.schedulerName
|
path: spec.template.spec.schedulerName
|
||||||
- it: schedulerName is defined
|
- it: "Render the configured schedulerName"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.schedulerName: stork
|
deployment.schedulerName: stork
|
||||||
@@ -177,7 +177,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.schedulerName
|
path: spec.template.spec.schedulerName
|
||||||
value: stork
|
value: stork
|
||||||
- it: strategy defaults to a rolling update
|
- it: "Default the strategy to a rolling update"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
@@ -187,7 +187,7 @@ tests:
|
|||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxUnavailable: 0
|
maxUnavailable: 0
|
||||||
maxSurge: 100%
|
maxSurge: 100%
|
||||||
- it: strategy omits rollingUpdate for other strategy types
|
- it: "Omit rollingUpdate for other strategy types"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.strategy.type: Recreate
|
deployment.strategy.type: Recreate
|
||||||
@@ -196,12 +196,12 @@ tests:
|
|||||||
path: spec.strategy
|
path: spec.strategy
|
||||||
value:
|
value:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
- it: tolerations are undefined
|
- it: "Omit the tolerations when none are configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.tolerations
|
path: spec.template.spec.tolerations
|
||||||
- it: tolerations are defined
|
- it: "Render the configured tolerations"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.tolerations:
|
deployment.tolerations:
|
||||||
@@ -217,12 +217,12 @@ tests:
|
|||||||
operator: Equal
|
operator: Equal
|
||||||
value: postgres
|
value: postgres
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
- it: topologySpreadConstraints are undefined
|
- it: "Omit the topologySpreadConstraints when none are configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.topologySpreadConstraints
|
path: spec.template.spec.topologySpreadConstraints
|
||||||
- it: topologySpreadConstraints are defined
|
- it: "Render the configured topologySpreadConstraints"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.topologySpreadConstraints:
|
deployment.topologySpreadConstraints:
|
||||||
@@ -243,7 +243,7 @@ tests:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/instance: gitea-unittests
|
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
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
@@ -251,7 +251,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: TMP_EXISTING_ENVS_FILE
|
name: TMP_EXISTING_ENVS_FILE
|
||||||
value: /tmp/existing-envs
|
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
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- contains:
|
- contains:
|
||||||
@@ -259,7 +259,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: ENV_TO_INI_MOUNT_POINT
|
name: ENV_TO_INI_MOUNT_POINT
|
||||||
value: /env-to-ini-mounts
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.env:
|
deployment.gitea.env:
|
||||||
@@ -286,7 +286,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: VARIABLE
|
name: VARIABLE
|
||||||
value: my-value
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.resources:
|
deployment.gitea.resources:
|
||||||
@@ -314,7 +314,7 @@ tests:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 100ms
|
cpu: 100ms
|
||||||
memory: 100Mi
|
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
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
@@ -328,12 +328,12 @@ tests:
|
|||||||
resourceFieldRef:
|
resourceFieldRef:
|
||||||
divisor: "1"
|
divisor: "1"
|
||||||
resource: limits.cpu
|
resource: limits.cpu
|
||||||
- it: pod level resources are undefined
|
- it: "Omit the pod level resources when none are configured"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.resources
|
path: spec.template.spec.resources
|
||||||
- it: pod level resources are defined
|
- it: "Render the configured pod level resources"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.resources:
|
deployment.resources:
|
||||||
@@ -353,7 +353,7 @@ tests:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 250m
|
cpu: 250m
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
- it: Init containers have correct volumeMount path
|
- it: "Render the configured volumeMount path of the init containers"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
initContainersScriptsVolumeMountPath: "/custom/init/path"
|
initContainersScriptsVolumeMountPath: "/custom/init/path"
|
||||||
@@ -364,7 +364,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath
|
path: spec.template.spec.initContainers[*].volumeMounts[?(@.name=="config")].mountPath
|
||||||
value: "/custom/init/path"
|
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
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: omits the checksum annotations by default
|
- it: "Omit the checksum annotations by default"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.enabled: true
|
secrets.admin.enabled: true
|
||||||
@@ -37,7 +37,7 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.metadata.annotations["checksum/metrics"]
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.addSHASumAnnotation: true
|
secrets.admin.addSHASumAnnotation: true
|
||||||
@@ -74,7 +74,7 @@ tests:
|
|||||||
- exists:
|
- exists:
|
||||||
path: spec.template.metadata.annotations["checksum/metrics"]
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.addSHASumAnnotation: false
|
secrets.admin.addSHASumAnnotation: false
|
||||||
@@ -111,7 +111,7 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.metadata.annotations["checksum/metrics"]
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.admin.enabled: true
|
secrets.admin.enabled: true
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: Renders a deployment
|
- it: "Render a Deployment with additionalConfigFromEnvs"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
@@ -20,7 +20,7 @@ tests:
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
- it: Deployment with empty additionalConfigFromEnvs
|
- it: "Render the Deployment with empty additionalConfigFromEnvs"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea.additionalConfigFromEnvs: []
|
gitea.additionalConfigFromEnvs: []
|
||||||
@@ -48,7 +48,7 @@ tests:
|
|||||||
value: /tmp/existing-envs
|
value: /tmp/existing-envs
|
||||||
- name: ENV_TO_INI_MOUNT_POINT
|
- name: ENV_TO_INI_MOUNT_POINT
|
||||||
value: /env-to-ini-mounts
|
value: /env-to-ini-mounts
|
||||||
- it: Deployment with standard additionalConfigFromEnvs
|
- it: "Render the Deployment with standard additionalConfigFromEnvs"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea.additionalConfigFromEnvs: [{name: GITEA_database_HOST, value: my-db:123}, {name: GITEA_database_USER, value: my-user}]
|
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
|
value: my-db:123
|
||||||
- name: GITEA_database_USER
|
- name: GITEA_database_USER
|
||||||
value: my-user
|
value: my-user
|
||||||
- it: Deployment with templated additionalConfigFromEnvs
|
- it: "Render the Deployment with templated additionalConfigFromEnvs"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea.misc.host: my-db-host:321
|
gitea.misc.host: my-db-host:321
|
||||||
@@ -114,7 +114,7 @@ tests:
|
|||||||
value: my-db-host:321
|
value: my-db-host:321
|
||||||
- name: GITEA_database_USER
|
- name: GITEA_database_USER
|
||||||
value: my-db-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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea.misc.existingSecret: my-db-secret
|
gitea.misc.existingSecret: my-db-secret
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/deprecation.yaml
|
- templates/deprecation.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders nothing with the default values
|
- it: "Render nothing with the default values"
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
- it: fails when the removed `affinity` value is set
|
- it: "Fail when the removed `affinity` value is set"
|
||||||
set:
|
set:
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
@@ -23,14 +23,14 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`affinity` does no longer exist. Please refer to the changelog and configure `deployment.affinity` instead."
|
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:
|
set:
|
||||||
containerSecurityContext:
|
containerSecurityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`containerSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.gitea.securityContext` instead."
|
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:
|
set:
|
||||||
deployment.env:
|
deployment.env:
|
||||||
- name: VARIABLE
|
- name: VARIABLE
|
||||||
@@ -38,7 +38,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`deployment.env` does no longer exist. Please refer to the changelog and configure `deployment.gitea.env` instead."
|
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:
|
set:
|
||||||
dnsConfig:
|
dnsConfig:
|
||||||
nameservers:
|
nameservers:
|
||||||
@@ -46,7 +46,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`dnsConfig` does no longer exist. Please refer to the changelog and configure `deployment.dnsConfig` instead."
|
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:
|
set:
|
||||||
extraContainerVolumeMounts:
|
extraContainerVolumeMounts:
|
||||||
- name: postgres-ssl-vol
|
- name: postgres-ssl-vol
|
||||||
@@ -54,7 +54,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead."
|
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:
|
set:
|
||||||
extraInitVolumeMounts:
|
extraInitVolumeMounts:
|
||||||
- name: postgres-ssl-vol
|
- name: postgres-ssl-vol
|
||||||
@@ -62,7 +62,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`extraInitVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.<initContainer>.volumeMounts` instead."
|
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:
|
set:
|
||||||
extraVolumeMounts:
|
extraVolumeMounts:
|
||||||
- name: postgres-ssl-vol
|
- name: postgres-ssl-vol
|
||||||
@@ -70,7 +70,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `deployment.<initContainer>.volumeMounts` instead."
|
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:
|
set:
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
- name: postgres-ssl-vol
|
- name: postgres-ssl-vol
|
||||||
@@ -79,39 +79,39 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead."
|
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:
|
set:
|
||||||
ingress.className: ""
|
ingress.className: ""
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`ingress.className` does no longer exist. Please refer to the changelog and configure `ingress.ingressClassName` instead."
|
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:
|
set:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
foo: bar
|
foo: bar
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead."
|
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:
|
set:
|
||||||
openshift.hostUsers: false
|
openshift.hostUsers: false
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead."
|
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:
|
set:
|
||||||
priorityClassName: high-priority
|
priorityClassName: high-priority
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`priorityClassName` does no longer exist. Please refer to the changelog and configure `deployment.priorityClassName` instead."
|
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:
|
set:
|
||||||
podSecurityContext:
|
podSecurityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`podSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` instead."
|
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:
|
set:
|
||||||
postExtraInitContainers:
|
postExtraInitContainers:
|
||||||
- name: post-init-container
|
- name: post-init-container
|
||||||
@@ -119,7 +119,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`postExtraInitContainers` does no longer exist. Please refer to the changelog and append an entry with a `container` key to `deployment.initContainers` instead."
|
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:
|
set:
|
||||||
preExtraInitContainers:
|
preExtraInitContainers:
|
||||||
- name: pre-init-container
|
- name: pre-init-container
|
||||||
@@ -127,7 +127,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`preExtraInitContainers` does no longer exist. Please refer to the changelog and prepend an entry with a `container` key to `deployment.initContainers` instead."
|
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:
|
set:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@@ -135,40 +135,40 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead."
|
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:
|
set:
|
||||||
replicaCount: 2
|
replicaCount: 2
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`replicaCount` does no longer exist. Please refer to the changelog and configure `deployment.replicas` instead."
|
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:
|
set:
|
||||||
schedulerName: stork
|
schedulerName: stork
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead."
|
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:
|
set:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`securityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` and `deployment.gitea.securityContext` instead."
|
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:
|
set:
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`strategy` does no longer exist. Please refer to the changelog and configure `deployment.strategy` instead."
|
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:
|
set:
|
||||||
test:
|
test:
|
||||||
enabled: false
|
enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`test` does no longer exist. Please refer to the changelog. The `helm test` connection Pod has been removed without replacement."
|
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:
|
set:
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: database/type
|
- key: database/type
|
||||||
@@ -178,14 +178,14 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead."
|
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:
|
set:
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints:
|
||||||
- topologyKey: kubernetes.io/hostname
|
- topologyKey: kubernetes.io/hostname
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead."
|
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:
|
set:
|
||||||
checkDeprecation: false
|
checkDeprecation: false
|
||||||
affinity:
|
affinity:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: uses direct execution when extraEnvSourceFile is not set
|
- it: "Use direct execution when extraEnvSourceFile is not set"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
@@ -25,7 +25,7 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.initContainers[2].args
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -41,7 +41,7 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[1].args[0]
|
path: spec.template.spec.initContainers[1].args[0]
|
||||||
pattern: config_environment\.sh
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -57,7 +57,7 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[2].args[0]
|
path: spec.template.spec.initContainers[2].args[0]
|
||||||
pattern: configure_gitea\.sh
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -76,7 +76,7 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[2].args[0]
|
path: spec.template.spec.initContainers[2].args[0]
|
||||||
pattern: configure_gpg_environment\.sh
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: Render the deployment (default)
|
- it: "Render the Deployment with the default init containers"
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 1
|
count: 1
|
||||||
@@ -21,7 +21,7 @@ tests:
|
|||||||
count: 3
|
count: 3
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
|
|
||||||
- it: Render the deployment (signing)
|
- it: "Render the Deployment with the signing init container"
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.existingSecret.enabled: true
|
secrets.gpg.existingSecret.enabled: true
|
||||||
@@ -35,7 +35,7 @@ tests:
|
|||||||
count: 4
|
count: 4
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
|
|
||||||
- it: Render the deployment (extraInitContainers)
|
- it: "Render the Deployment with extraInitContainers"
|
||||||
set:
|
set:
|
||||||
deployment.initContainers:
|
deployment.initContainers:
|
||||||
- container:
|
- container:
|
||||||
@@ -68,7 +68,7 @@ tests:
|
|||||||
value: foo
|
value: foo
|
||||||
template: templates/deployment.yaml
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initContainers:
|
deployment.initContainers:
|
||||||
@@ -82,7 +82,7 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[1].name
|
path: spec.template.spec.initContainers[1].name
|
||||||
value: init-directories
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initContainers:
|
deployment.initContainers:
|
||||||
@@ -94,7 +94,7 @@ tests:
|
|||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "deployment.initContainers[0]: `container` and `link` are mutually exclusive"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initContainers:
|
deployment.initContainers:
|
||||||
@@ -103,7 +103,7 @@ tests:
|
|||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: "deployment.initContainers[0]: either `container` or `link` must be set"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initContainers:
|
deployment.initContainers:
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: default values
|
- it: "Render the default image reference"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.3-rootless"
|
value: "docker.gitea.com/gitea:1.19.3-rootless"
|
||||||
- it: tag override
|
- it: "Render a custom image tag"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.tag: "1.19.4"
|
deployment.gitea.image.tag: "1.19.4"
|
||||||
@@ -28,7 +28,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.4-rootless"
|
value: "docker.gitea.com/gitea:1.19.4-rootless"
|
||||||
- it: root-based image
|
- it: "Render the root-based image variant"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
@@ -36,7 +36,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.3"
|
value: "docker.gitea.com/gitea:1.19.3"
|
||||||
- it: scoped registry
|
- it: "Render a scoped image registry"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.registry: "example.com"
|
deployment.gitea.image.registry: "example.com"
|
||||||
@@ -44,7 +44,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "example.com/gitea:1.19.3-rootless"
|
value: "example.com/gitea:1.19.3-rootless"
|
||||||
- it: global registry
|
- it: "Render the global image registry"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
global.imageRegistry: "global.example.com"
|
global.imageRegistry: "global.example.com"
|
||||||
@@ -52,7 +52,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "global.example.com/gitea:1.19.3-rootless"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -64,7 +64,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -81,7 +81,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.3"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment:
|
deployment:
|
||||||
@@ -93,7 +93,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.19.3@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
global.imageRegistry: "global.example.com"
|
global.imageRegistry: "global.example.com"
|
||||||
@@ -102,7 +102,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "global.example.com/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
# use non-quoted values on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
|
# use non-quoted values on purpose. See: https://gitea.com/gitea/helm-gitea/issues/631
|
||||||
@@ -123,7 +123,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "docker.gitea.com/gitea:1.21-rootless"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initDirectories.image.registry: "init.example.com"
|
deployment.initDirectories.image.registry: "init.example.com"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: appends the per-container env
|
- it: "Append the per-container env"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initDirectories.env:
|
deployment.initDirectories.env:
|
||||||
@@ -37,7 +37,7 @@ tests:
|
|||||||
name: INIT_DIRECTORIES
|
name: INIT_DIRECTORIES
|
||||||
value: "1"
|
value: "1"
|
||||||
|
|
||||||
- it: renders the per-container envFrom
|
- it: "Render the per-container envFrom"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initAppIni.envFrom:
|
deployment.initAppIni.envFrom:
|
||||||
@@ -52,7 +52,7 @@ tests:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: special-secret
|
name: special-secret
|
||||||
|
|
||||||
- it: appends the per-container volumeMounts
|
- it: "Append the per-container volumeMounts"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initConfigureGitea.volumeMounts:
|
deployment.initConfigureGitea.volumeMounts:
|
||||||
@@ -73,7 +73,7 @@ tests:
|
|||||||
mountPath: /configmap
|
mountPath: /configmap
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
- it: overrides the resources of a single init container
|
- it: "Override the resources of a single init container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.initDirectories.resources:
|
deployment.initDirectories.resources:
|
||||||
@@ -93,7 +93,7 @@ tests:
|
|||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 128Mi
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.securityContext:
|
deployment.gitea.securityContext:
|
||||||
@@ -108,7 +108,7 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[1].securityContext.runAsUser
|
path: spec.template.spec.initContainers[1].securityContext.runAsUser
|
||||||
value: 1000
|
value: 1000
|
||||||
|
|
||||||
- it: renders the envFrom of the gitea container
|
- it: "Render the envFrom of the gitea container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.envFrom:
|
deployment.gitea.envFrom:
|
||||||
@@ -121,7 +121,7 @@ tests:
|
|||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: special-config
|
name: special-config
|
||||||
|
|
||||||
- it: omits envFrom when unset
|
- it: "Omit the envFrom when it is unset"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: inline config data.server using TPL
|
- it: "Render the inline config of data.server via tpl"
|
||||||
set:
|
set:
|
||||||
global.giteaHostName: "gitea.example.com"
|
global.giteaHostName: "gitea.example.com"
|
||||||
ingress.enabled: true
|
ingress.enabled: true
|
||||||
@@ -34,7 +34,7 @@ tests:
|
|||||||
path: data.server
|
path: data.server
|
||||||
decodeBase64: true
|
decodeBase64: true
|
||||||
pattern: SSH_DOMAIN=gitea\.example\.com
|
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:
|
asserts:
|
||||||
- documentIndex: 0
|
- documentIndex: 0
|
||||||
notExists:
|
notExists:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders openshift-compatible defaults for chart-managed containers
|
- it: "Render OpenShift compatible defaults for the chart-managed containers"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
openshift.enabled: true
|
openshift.enabled: true
|
||||||
@@ -61,7 +61,7 @@ tests:
|
|||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
openshift.enabled: true
|
openshift.enabled: true
|
||||||
@@ -74,7 +74,7 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.initContainers[3].securityContext.runAsUser
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
openshift:
|
openshift:
|
||||||
@@ -102,7 +102,7 @@ tests:
|
|||||||
path: spec.template.spec.containers[0].securityContext.runAsGroup
|
path: spec.template.spec.containers[0].securityContext.runAsGroup
|
||||||
value: 1000620000
|
value: 1000620000
|
||||||
|
|
||||||
- it: renders an explicit hostUsers=false override on OpenShift
|
- it: "Render an explicit hostUsers=false override on OpenShift"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
openshift:
|
openshift:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders default liveness probe
|
- it: "Render the default liveness probe"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
@@ -26,7 +26,7 @@ tests:
|
|||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: http
|
port: http
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
- it: renders default readiness probe
|
- it: "Render the default readiness probe"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
@@ -41,12 +41,12 @@ tests:
|
|||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: http
|
port: http
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
- it: does not render a default startup probe
|
- it: "Skip the startup probe by default"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.containers[0].startupProbe
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea.startupProbe.enabled: true
|
gitea.startupProbe.enabled: true
|
||||||
@@ -64,7 +64,7 @@ tests:
|
|||||||
port: http
|
port: http
|
||||||
timeoutSeconds: 1
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -78,7 +78,7 @@ tests:
|
|||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: my-port
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -92,7 +92,7 @@ tests:
|
|||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: my-port
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -107,7 +107,7 @@ tests:
|
|||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: my-port
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -135,7 +135,7 @@ tests:
|
|||||||
port: http
|
port: http
|
||||||
timeoutSeconds: 13372
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -163,7 +163,7 @@ tests:
|
|||||||
port: http
|
port: http
|
||||||
timeoutSeconds: 13372
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
gitea:
|
gitea:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: supports adding a sidecar container
|
- it: "Render an additional sidecar container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
extraContainers:
|
extraContainers:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: skips gpg init container
|
- it: "Skip the gpg init container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notContains:
|
- notContains:
|
||||||
@@ -19,7 +19,7 @@ tests:
|
|||||||
any: true
|
any: true
|
||||||
content:
|
content:
|
||||||
name: configure-gpg
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: false
|
secrets.gpg.enabled: false
|
||||||
@@ -28,14 +28,14 @@ tests:
|
|||||||
path: spec.template.spec.initContainers[0].env
|
path: spec.template.spec.initContainers[0].env
|
||||||
content:
|
content:
|
||||||
name: GNUPGHOME
|
name: GNUPGHOME
|
||||||
- it: skips gpg env in runtime container
|
- it: "Skip the gpg env of the runtime container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notContains:
|
- notContains:
|
||||||
path: spec.template.spec.containers[0].env
|
path: spec.template.spec.containers[0].env
|
||||||
content:
|
content:
|
||||||
name: GNUPGHOME
|
name: GNUPGHOME
|
||||||
- it: skips gpg volume spec
|
- it: "Skip the gpg volume spec"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
asserts:
|
asserts:
|
||||||
- notContains:
|
- notContains:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: adds gpg init container
|
- it: "Add the gpg init container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -48,7 +48,7 @@ tests:
|
|||||||
- name: gpg-private-key
|
- name: gpg-private-key
|
||||||
mountPath: /raw
|
mountPath: /raw
|
||||||
readOnly: true
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -63,7 +63,7 @@ tests:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: custom-gpg-secret
|
name: custom-gpg-secret
|
||||||
key: gpgHome
|
key: gpgHome
|
||||||
- it: adds gpg env in runtime container
|
- it: "Add the gpg env to the runtime container"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -78,7 +78,7 @@ tests:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: custom-gpg-secret
|
name: custom-gpg-secret
|
||||||
key: gpgHome
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -94,7 +94,7 @@ tests:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: custom-gpg-secret
|
name: custom-gpg-secret
|
||||||
key: custom-gpg-home
|
key: custom-gpg-home
|
||||||
- it: adds gpg volume spec
|
- it: "Add the gpg volume spec"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -110,7 +110,7 @@ tests:
|
|||||||
- key: privateKey
|
- key: privateKey
|
||||||
path: private.asc
|
path: private.asc
|
||||||
defaultMode: 0100
|
defaultMode: 0100
|
||||||
- it: supports gpg volume spec with external reference
|
- it: "Render the gpg volume spec with an external reference"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ templates:
|
|||||||
- templates/secret_inlineConfig.yaml
|
- templates/secret_inlineConfig.yaml
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
@@ -21,7 +21,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: SSH_LOG_LEVEL
|
name: SSH_LOG_LEVEL
|
||||||
value: "INFO"
|
value: "INFO"
|
||||||
- it: supports overriding SSH log level
|
- it: "Override the SSH log level"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
@@ -32,7 +32,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: SSH_LOG_LEVEL
|
name: SSH_LOG_LEVEL
|
||||||
value: "DEBUG"
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
||||||
@@ -44,7 +44,7 @@ tests:
|
|||||||
content:
|
content:
|
||||||
name: SSH_LOG_LEVEL
|
name: SSH_LOG_LEVEL
|
||||||
value: "DEBUG"
|
value: "DEBUG"
|
||||||
- it: skips SSH_LOG_LEVEL for rootless image
|
- it: "Skip SSH_LOG_LEVEL for the rootless image"
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.rootless: true
|
deployment.gitea.image.rootless: true
|
||||||
@@ -55,7 +55,7 @@ tests:
|
|||||||
any: true
|
any: true
|
||||||
content:
|
content:
|
||||||
name: SSH_LOG_LEVEL
|
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
|
template: templates/deployment.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.19.3
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ suite: Storage class configuration tests
|
|||||||
templates:
|
templates:
|
||||||
- templates/persistentVolumeClaim.yaml
|
- templates/persistentVolumeClaim.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: Set storageClassName when persistence.new.storageClassName is defined
|
- it: "Render the storageClassName when persistence.new.storageClassName is defined"
|
||||||
set:
|
set:
|
||||||
persistence.enabled: true
|
persistence.enabled: true
|
||||||
persistence.new.storageClassName: my-storage-class
|
persistence.new.storageClassName: my-storage-class
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ templates:
|
|||||||
- templates/service_ssh.yaml
|
- templates/service_ssh.yaml
|
||||||
- templates/service_http.yaml
|
- templates/service_http.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: supports adding custom labels to sshService
|
- it: "Add custom labels to the SSH Service"
|
||||||
template: templates/service_ssh.yaml
|
template: templates/service_ssh.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -18,7 +18,7 @@ tests:
|
|||||||
path: metadata.labels["gitea/testkey"]
|
path: metadata.labels["gitea/testkey"]
|
||||||
value: "testvalue"
|
value: "testvalue"
|
||||||
|
|
||||||
- it: keeps existing labels (ssh)
|
- it: "Keep the existing labels of the SSH Service"
|
||||||
template: templates/service_ssh.yaml
|
template: templates/service_ssh.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -28,7 +28,7 @@ tests:
|
|||||||
- exists:
|
- exists:
|
||||||
path: metadata.labels["app"]
|
path: metadata.labels["app"]
|
||||||
|
|
||||||
- it: supports adding custom labels to httpService
|
- it: "Add custom labels to the HTTP Service"
|
||||||
template: templates/service_http.yaml
|
template: templates/service_http.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -40,7 +40,7 @@ tests:
|
|||||||
path: metadata.labels["gitea/testkey"]
|
path: metadata.labels["gitea/testkey"]
|
||||||
value: "testvalue"
|
value: "testvalue"
|
||||||
|
|
||||||
- it: keeps existing labels (http)
|
- it: "Keep the existing labels of the HTTP Service"
|
||||||
template: templates/service_http.yaml
|
template: templates/service_http.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -50,7 +50,7 @@ tests:
|
|||||||
- exists:
|
- exists:
|
||||||
path: metadata.labels["app"]
|
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
|
template: templates/service_ssh.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -72,7 +72,7 @@ tests:
|
|||||||
path: spec.loadBalancerSourceRanges
|
path: spec.loadBalancerSourceRanges
|
||||||
value: ["1.2.3.4/32", "5.6.7.8/32"]
|
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
|
template: templates/service_http.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -91,7 +91,7 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.loadBalancerSourceRanges
|
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
|
template: templates/service_http.yaml
|
||||||
set:
|
set:
|
||||||
service:
|
service:
|
||||||
@@ -105,7 +105,7 @@ tests:
|
|||||||
path: spec.loadBalancerIP
|
path: spec.loadBalancerIP
|
||||||
value: "1.2.3.4"
|
value: "1.2.3.4"
|
||||||
|
|
||||||
- it: both ssh and http services exist
|
- it: "Render both the SSH and the HTTP Service"
|
||||||
templates:
|
templates:
|
||||||
- templates/service_ssh.yaml
|
- templates/service_ssh.yaml
|
||||||
- templates/service_http.yaml
|
- templates/service_http.yaml
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/backendTLSPolicy.yaml
|
- templates/backendTLSPolicy.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: should not render when gatewayAPI.enabled is false
|
- it: "Skip rendering when gatewayAPI.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -22,7 +22,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should not render when backendTLSPolicy.enabled is false
|
- it: "Skip rendering when backendTLSPolicy.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -31,7 +31,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should render a BackendTLSPolicy targeting the http Service by default
|
- it: "Render a BackendTLSPolicy targeting the HTTP Service by default"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -65,7 +65,7 @@ tests:
|
|||||||
path: spec.validation.hostname
|
path: spec.validation.hostname
|
||||||
value: git.internal
|
value: git.internal
|
||||||
|
|
||||||
- it: should fail when validation is missing
|
- it: "Fail when the validation is missing"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -76,7 +76,7 @@ tests:
|
|||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: gatewayAPI.core.backendTLSPolicy.validation is required
|
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:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/clientSettingsPolicy.yaml
|
- templates/clientSettingsPolicy.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: should not render when gatewayAPI.enabled is false
|
- it: "Skip rendering when gatewayAPI.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -18,7 +18,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should not render when clientSettingsPolicies.enabled is false
|
- it: "Skip rendering when clientSettingsPolicies.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -27,7 +27,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should render a ClientSettingsPolicy targeting the HTTPRoute by default
|
- it: "Render a ClientSettingsPolicy targeting the HTTPRoute by default"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -60,7 +60,7 @@ tests:
|
|||||||
path: spec.body.maxSize
|
path: spec.body.maxSize
|
||||||
value: 100m
|
value: 100m
|
||||||
|
|
||||||
- it: should honor a custom targetRef
|
- it: "Render a custom targetRef"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -81,7 +81,7 @@ tests:
|
|||||||
path: spec.targetRef.name
|
path: spec.targetRef.name
|
||||||
value: shared-gateway
|
value: shared-gateway
|
||||||
|
|
||||||
- it: should fail when body is missing
|
- it: "Fail when the body is missing"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -92,7 +92,7 @@ tests:
|
|||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: gatewayAPI.nginx.clientSettingsPolicies.body is required
|
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:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/httpRoute.yaml
|
- templates/httpRoute.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: should not render when gatewayAPI.enabled is false
|
- it: "Skip rendering when gatewayAPI.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -20,7 +20,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should not render when httpRoute.enabled is false
|
- it: "Skip rendering when httpRoute.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -29,7 +29,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should render a single HTTPRoute with default rule
|
- it: "Render a single HTTPRoute with the default rule"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -85,7 +85,7 @@ tests:
|
|||||||
path: spec.rules[0].backendRefs[0].weight
|
path: spec.rules[0].backendRefs[0].weight
|
||||||
value: 1
|
value: 1
|
||||||
|
|
||||||
- it: should fail when parentRefs missing
|
- it: "Fail when the parentRefs are missing"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -98,7 +98,7 @@ tests:
|
|||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: gatewayAPI.core.httpRoute.parentRefs is required
|
errorMessage: gatewayAPI.core.httpRoute.parentRefs is required
|
||||||
|
|
||||||
- it: hostname tpl rendering
|
- it: "Render the hostnames via tpl"
|
||||||
set:
|
set:
|
||||||
global:
|
global:
|
||||||
giteaHostName: gitea.tpl.example.com
|
giteaHostName: gitea.tpl.example.com
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/tcpRoute.yaml
|
- templates/tcpRoute.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: should not render when gatewayAPI.enabled is false
|
- it: "Skip rendering when gatewayAPI.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -18,7 +18,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should not render when tcpRoute.enabled is false
|
- it: "Skip rendering when tcpRoute.enabled is false"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -27,7 +27,7 @@ tests:
|
|||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
|
|
||||||
- it: should render a TCPRoute defaulting to the SSH service
|
- it: "Render a TCPRoute defaulting to the SSH Service"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -67,7 +67,7 @@ tests:
|
|||||||
path: spec.rules[0].backendRefs[0].weight
|
path: spec.rules[0].backendRefs[0].weight
|
||||||
value: 1
|
value: 1
|
||||||
|
|
||||||
- it: should fail when parentRefs missing
|
- it: "Fail when the parentRefs are missing"
|
||||||
set:
|
set:
|
||||||
gatewayAPI:
|
gatewayAPI:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_gpg.yaml
|
- templates/secret_gpg.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders nothing
|
- it: "Skip rendering when signing is disabled"
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: false
|
secrets.gpg.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_gpg.yaml
|
- templates/secret_gpg.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: fails rendering when nothing is configured
|
- it: "Fail when no gpg key is configured"
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
asserts:
|
asserts:
|
||||||
- failedTemplate:
|
- failedTemplate:
|
||||||
errorMessage: Either specify `secrets.gpg.new.privateKey` or reference an existing Secret via `secrets.gpg.existingSecret`
|
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:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.existingSecret.enabled: true
|
secrets.gpg.existingSecret.enabled: true
|
||||||
@@ -19,7 +19,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
- it: renders secret specification using inline gpg key
|
- it: "Render the Secret with an inline gpg key"
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.new.privateKey: "gpg-key-placeholder"
|
secrets.gpg.new.privateKey: "gpg-key-placeholder"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_init.yaml
|
- templates/secret_init.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders a secret
|
- it: "Render the Secret"
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 1
|
count: 1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_init.yaml
|
- templates/secret_init.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: runs gpg in batch mode
|
- it: "Run gpg in batch mode"
|
||||||
set:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.new.privateKey: |-
|
secrets.gpg.new.privateKey: |-
|
||||||
@@ -21,7 +21,7 @@ tests:
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
gpg --batch --import "$TMP_RAW_GPG_KEY"
|
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:
|
asserts:
|
||||||
- equal:
|
- equal:
|
||||||
path: data["init_directory_structure.sh"]
|
path: data["init_directory_structure.sh"]
|
||||||
@@ -37,7 +37,7 @@ tests:
|
|||||||
# prepare temp directory structure
|
# prepare temp directory structure
|
||||||
mkdir -pv "${GITEA_TEMP}"
|
mkdir -pv "${GITEA_TEMP}"
|
||||||
chmod -v ug+rwx "${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:
|
set:
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
secrets.gpg.new.privateKey: |-
|
secrets.gpg.new.privateKey: |-
|
||||||
@@ -65,7 +65,7 @@ tests:
|
|||||||
chmod -v 700 "${GNUPGHOME}"
|
chmod -v 700 "${GNUPGHOME}"
|
||||||
chown -v 1000:1000 "${GNUPGHOME}"
|
chown -v 1000:1000 "${GNUPGHOME}"
|
||||||
fi
|
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
|
template: templates/secret_init.yaml
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5
|
deployment.gitea.image.fullOverride: docker.gitea.com/gitea:1.20.5
|
||||||
@@ -84,7 +84,7 @@ tests:
|
|||||||
# prepare temp directory structure
|
# prepare temp directory structure
|
||||||
mkdir -pv "${GITEA_TEMP}"
|
mkdir -pv "${GITEA_TEMP}"
|
||||||
chmod -v ug+rwx "${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:
|
asserts:
|
||||||
- notExists:
|
- notExists:
|
||||||
path: stringData
|
path: stringData
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_init.yaml
|
- templates/secret_init.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: runs gpg in batch mode
|
- it: "Run gpg in batch mode"
|
||||||
set:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -22,7 +22,7 @@ tests:
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
gpg --batch --import "$TMP_RAW_GPG_KEY"
|
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:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
asserts:
|
asserts:
|
||||||
@@ -42,7 +42,7 @@ tests:
|
|||||||
mkdir -pv "${GITEA_TEMP}"
|
mkdir -pv "${GITEA_TEMP}"
|
||||||
chown -v 1000:1000 "${GITEA_TEMP}"
|
chown -v 1000:1000 "${GITEA_TEMP}"
|
||||||
chmod -v ug+rwx "${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:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
secrets.gpg.enabled: true
|
secrets.gpg.enabled: true
|
||||||
@@ -73,7 +73,7 @@ tests:
|
|||||||
chmod -v 700 "${GNUPGHOME}"
|
chmod -v 700 "${GNUPGHOME}"
|
||||||
chown -v 1000:1000 "${GNUPGHOME}"
|
chown -v 1000:1000 "${GNUPGHOME}"
|
||||||
fi
|
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:
|
set:
|
||||||
deployment.gitea.image.rootless: false
|
deployment.gitea.image.rootless: false
|
||||||
asserts:
|
asserts:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
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:
|
set:
|
||||||
gitea.metrics.enabled: false
|
gitea.metrics.enabled: false
|
||||||
gitea.metrics.serviceMonitor.enabled: false
|
gitea.metrics.serviceMonitor.enabled: false
|
||||||
@@ -13,7 +13,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
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:
|
set:
|
||||||
gitea.metrics.enabled: false
|
gitea.metrics.enabled: false
|
||||||
gitea.metrics.serviceMonitor.enabled: false
|
gitea.metrics.serviceMonitor.enabled: false
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/secret_metrics.yaml
|
- templates/secret_metrics.yaml
|
||||||
tests:
|
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:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
@@ -13,7 +13,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
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:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/route.yaml
|
- templates/route.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: should create route when route.enabled is true
|
- it: "Render the Route when route.enabled is true"
|
||||||
set:
|
set:
|
||||||
route:
|
route:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -50,7 +50,7 @@ tests:
|
|||||||
path: spec.tls.insecureEdgeTerminationPolicy
|
path: spec.tls.insecureEdgeTerminationPolicy
|
||||||
value: Redirect
|
value: Redirect
|
||||||
|
|
||||||
- it: should not create route when route.enabled is false
|
- it: "Skip rendering when route.enabled is false"
|
||||||
set:
|
set:
|
||||||
route.enabled: false
|
route.enabled: false
|
||||||
asserts:
|
asserts:
|
||||||
|
|||||||
@@ -5,23 +5,23 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/serviceMonitor.yaml
|
- templates/serviceMonitor.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: skips rendering by default
|
- it: "Skip rendering by default"
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
- it: renders default ServiceMonitor object with gitea.metrics.enabled=true
|
- it: "Render the ServiceMonitor when gitea.metrics.enabled is true"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
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:
|
set:
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
count: 0
|
||||||
- it: renders defaults
|
- it: "Render the default ServiceMonitor spec"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
@@ -45,7 +45,7 @@ tests:
|
|||||||
path: spec.endpoints[0].scrapeTimeout
|
path: spec.endpoints[0].scrapeTimeout
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.endpoints[0].tlsConfig
|
path: spec.endpoints[0].tlsConfig
|
||||||
- it: renders custom scrape interval
|
- it: "Render a custom scrape interval"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
@@ -58,7 +58,7 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.endpoints[0].scrapeTimeout
|
path: spec.endpoints[0].scrapeTimeout
|
||||||
value: 5s
|
value: 5s
|
||||||
- it: renders custom tls config
|
- it: "Render a custom tls config"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.serviceMonitor.enabled: true
|
gitea.metrics.serviceMonitor.enabled: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/serviceMonitor.yaml
|
- templates/serviceMonitor.yaml
|
||||||
tests:
|
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:
|
set:
|
||||||
gitea.metrics.enabled: false
|
gitea.metrics.enabled: false
|
||||||
gitea.metrics.token: ""
|
gitea.metrics.token: ""
|
||||||
@@ -13,7 +13,7 @@ tests:
|
|||||||
asserts:
|
asserts:
|
||||||
- hasDocuments:
|
- hasDocuments:
|
||||||
count: 0
|
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:
|
set:
|
||||||
gitea.metrics.enabled: false
|
gitea.metrics.enabled: false
|
||||||
gitea.metrics.token: "test-token"
|
gitea.metrics.token: "test-token"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ release:
|
|||||||
templates:
|
templates:
|
||||||
- templates/serviceMonitor.yaml
|
- templates/serviceMonitor.yaml
|
||||||
tests:
|
tests:
|
||||||
- it: renders unsecure ServiceMonitor if gitea.metrics.token nil
|
- it: "Render an unsecured ServiceMonitor when gitea.metrics.token is nil"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.token:
|
gitea.metrics.token:
|
||||||
@@ -24,7 +24,7 @@ tests:
|
|||||||
path: spec.endpoints
|
path: spec.endpoints
|
||||||
value:
|
value:
|
||||||
- port: http
|
- port: http
|
||||||
- it: renders unsecure ServiceMonitor if gitea.metrics.token empty
|
- it: "Render an unsecured ServiceMonitor when gitea.metrics.token is empty"
|
||||||
set:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.token: ""
|
gitea.metrics.token: ""
|
||||||
@@ -43,7 +43,7 @@ tests:
|
|||||||
path: spec.endpoints
|
path: spec.endpoints
|
||||||
value:
|
value:
|
||||||
- port: http
|
- 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:
|
set:
|
||||||
gitea.metrics.enabled: true
|
gitea.metrics.enabled: true
|
||||||
gitea.metrics.token: "test-token"
|
gitea.metrics.token: "test-token"
|
||||||
|
|||||||
Reference in New Issue
Block a user