Files
helm-gitea/unittests/helm/serviceaccount/reference.yaml
Markus Pesch 72606192a6 refactor(structure): remove leading gitea directory (#958)
The following pull request removes the `gitea` directory. With regard to maintaining act_runners in a separate git repository or helm chart, this additional directory becomes redundant.

Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/958
Reviewed-by: DaanSelen <daanselen@noreply.gitea.com>
Co-authored-by: Markus Pesch <markus.pesch@cryptic.systems>
Co-committed-by: Markus Pesch <markus.pesch@cryptic.systems>
2025-10-02 11:36:47 +00:00

33 lines
1.0 KiB
YAML

suite: ServiceAccount template (reference)
release:
name: gitea-unittests
namespace: testing
templates:
- templates/serviceaccount.yaml
- templates/deployment.yaml
- templates/config.yaml
tests:
- it: does not modify the deployment by default
template: templates/deployment.yaml
asserts:
- notExists:
path: spec.serviceAccountName
- it: adds the reference to the deployment with serviceAccount.create=true
template: templates/deployment.yaml
set:
serviceAccount.create: true
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: gitea-unittests
- it: allows referencing an externally created ServiceAccount to the deployment
template: templates/deployment.yaml
set:
serviceAccount:
create: false # explicitly set to define rendering behavior
name: "externally-existing-serviceaccount"
asserts:
- equal:
path: spec.template.spec.serviceAccountName
value: externally-existing-serviceaccount