# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json suite: actions template | config-act-runner release: name: gitea-unittests namespace: testing templates: - templates/config-act-runner.yaml tests: - it: doesn't renders a ConfigMap by default template: templates/config-act-runner.yaml asserts: - hasDocuments: count: 0 - it: renders a ConfigMap template: templates/config-act-runner.yaml set: enabled: true statefulset: actRunner: config: | log: level: info cache: enabled: false runner: labels: - "ubuntu-latest" asserts: - hasDocuments: count: 1 - containsDocument: kind: ConfigMap apiVersion: v1 name: gitea-unittests-actions-act-runner-config - 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/config-act-runner.yaml set: enabled: true statefulset: actRunner: 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-unittests-actions-act-runner-config - 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*$'