26 lines
795 B
YAML
26 lines
795 B
YAML
![]() |
# $schema: https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||
|
suite: deployment template (security context)
|
||
|
release:
|
||
|
name: gitea-unittests
|
||
|
namespace: testing
|
||
|
templates:
|
||
|
- templates/gitea/deployment.yaml
|
||
|
- templates/gitea/config.yaml
|
||
|
tests:
|
||
|
- it: FS group set to 1000
|
||
|
template: templates/gitea/deployment.yaml
|
||
|
set:
|
||
|
image.rootless: false
|
||
|
asserts:
|
||
|
- equal:
|
||
|
path: spec.template.spec.securityContext.fsGroup
|
||
|
value: 1000
|
||
|
- it: run configure-gitea with UID 1000
|
||
|
template: templates/gitea/deployment.yaml
|
||
|
set:
|
||
|
image.rootless: false
|
||
|
asserts:
|
||
|
- equal:
|
||
|
path: spec.template.spec.initContainers[?(@.name == 'configure-gitea')].securityContext.runAsUser
|
||
|
value: 1000
|