Files
helm-actions/unittests/helm/configmap.yaml
Daan 7e2aedfdc2
Some checks failed
changelog / changelog (push) Has been cancelled
check-and-test / check-and-test (push) Has been cancelled
feat: rename any form of act runner to gitea runner or runner (#149)
fix: https://gitea.com/gitea/helm-actions/issues/142
Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/149
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: Daan <dselen@nerthus.nl>
Co-committed-by: Daan <dselen@nerthus.nl>
2026-05-20 20:08:01 +00:00

69 lines
1.9 KiB
YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: actions template | configmap
release:
name: gitea-actions-unittests
namespace: testing
templates:
- templates/configmap.yaml
tests:
- it: doesn't renders a ConfigMap by default
template: templates/configmap.yaml
asserts:
- hasDocuments:
count: 0
- it: renders a ConfigMap
template: templates/configmap.yaml
set:
enabled: true
statefulset:
runner:
config: |
log:
level: info
cache:
enabled: false
runner:
labels:
- "ubuntu-latest"
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: ConfigMap
apiVersion: v1
name: gitea-actions-unittests-runner-configmap
- equal:
path: data["config.yaml"]
value: |
log:
level: info
cache:
enabled: false
runner:
labels:
- "ubuntu-latest"
- it: renders a ConfigMap with inline yaml
template: templates/configmap.yaml
set:
enabled: true
statefulset:
runner:
config: |
container:
valid_volumes:
- /var/run/docker.sock
options: -v /var/run/docker.sock:/var/run/docker.sock
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: ConfigMap
apiVersion: v1
name: gitea-actions-unittests-runner-configmap
- matchRegex:
path: data["config.yaml"]
pattern: '(?m)^\s*options:\s*-v /var/run/docker.sock:/var/run/docker.sock\s*$'
- matchRegex:
path: data["config.yaml"]
pattern: '(?m)^\s*valid_volumes:\s*\n\s*-\s*/var/run/docker.sock\s*$'