50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
suite: actions template | config-scripts
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/act_runner/config-scripts.yaml
|
|
tests:
|
|
- it: renders a ConfigMap when all criteria are met
|
|
template: templates/gitea/act_runner/config-scripts.yaml
|
|
set:
|
|
actions:
|
|
enabled: true
|
|
provisioning:
|
|
enabled: true
|
|
persistence:
|
|
enabled: true
|
|
mount: true
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 1
|
|
- containsDocument:
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
name: gitea-unittests-scripts
|
|
- isNotNullOrEmpty:
|
|
path: data["token.sh"]
|
|
- it: doesn't renders a ConfigMap by default
|
|
template: templates/gitea/act_runner/config-scripts.yaml
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: doesn't renders a ConfigMap with disabled actions but enabled provisioning
|
|
template: templates/gitea/act_runner/config-scripts.yaml
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: doesn't renders a ConfigMap with disabled actions but otherwise met criteria
|
|
template: templates/gitea/act_runner/config-scripts.yaml
|
|
set:
|
|
actions:
|
|
enabled: false
|
|
provisioning:
|
|
enabled: true
|
|
persistence:
|
|
enabled: true
|
|
mount: true
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|