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>
33 lines
995 B
YAML
33 lines
995 B
YAML
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: background-variables-update
|
|
spec:
|
|
steps:
|
|
- name: step-01
|
|
try:
|
|
- script:
|
|
content: |
|
|
if kubectl apply -f policy-deprecated-operator.yaml 2>&1 | grep -q "Warning: Operator NotIn has been deprecated and will be removed soon."
|
|
then
|
|
echo "Test succeeded. Warning was displayed."
|
|
exit 0
|
|
else
|
|
echo "Tested failed. Warning was not displayed."
|
|
exit 1
|
|
fi
|
|
- name: step-01
|
|
try:
|
|
- script:
|
|
content: |
|
|
mkfifo test-pipe
|
|
if kubectl apply -f policy-invalid-operator.yaml 2> test-pipe | grep -q "entered value of \`operator\` is invalid" test-pipe
|
|
then
|
|
echo "Test succeeded. Warning was displayed."
|
|
rm test-pipe
|
|
exit 0
|
|
else
|
|
echo "Tested failed. Warning was not displayed."
|
|
rm test-pipe
|
|
exit 1
|
|
fi
|