26 lines
886 B
YAML
26 lines
886 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 not set
|
||
|
template: templates/gitea/deployment.yaml
|
||
|
set:
|
||
|
image.rootless: false
|
||
|
global.compatibility.openshift.adaptSecurityContext: force
|
||
|
asserts:
|
||
|
- notExists:
|
||
|
path: spec.template.spec.securityContext.fsGroup
|
||
|
- it: configure-gitea without runaAsUser
|
||
|
template: templates/gitea/deployment.yaml
|
||
|
set:
|
||
|
image.rootless: false
|
||
|
global.compatibility.openshift.adaptSecurityContext: force
|
||
|
asserts:
|
||
|
- notExists:
|
||
|
path: spec.template.spec.initContainers[?(@.name == 'configure-gitea')].securityContext.runAsUser
|