mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
* chore: bump chainsaw Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * more template use Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * v0.2.10 Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * go mod Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
22 lines
762 B
YAML
Executable file
22 lines
762 B
YAML
Executable file
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: cel-expressions
|
|
spec:
|
|
steps:
|
|
- name: Apply the first policy
|
|
try:
|
|
- script:
|
|
content: kubectl apply -f policy-1.yaml
|
|
check:
|
|
# This check ensures that the string "undefined field 'automountServiceAccountToken';" is found
|
|
# in stderr or else fails
|
|
(contains($stderr, 'undefined field \'automountServiceAccountToken\';')): true
|
|
- name: Apply the second policy
|
|
try:
|
|
- script:
|
|
content: kubectl apply -f policy-2.yaml
|
|
check:
|
|
# This check ensures that the string "undefined field 'replicas';" is found
|
|
# in stderr or else fails
|
|
(contains($stderr, 'undefined field \'replicas\';')): true
|