mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: chainsaw test (#9148)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
a67d05399e
commit
4564e1de8f
7 changed files with 40 additions and 76 deletions
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: badpod
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- apply:
|
||||
file: bad-pod.yaml
|
||||
- assert:
|
||||
file: bad-pod-ready.yaml
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: policy
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: goodpod
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- apply:
|
||||
file: good-pod.yaml
|
||||
- assert:
|
||||
file: good-pod-ready.yaml
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: badpod
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- script:
|
||||
content: ./bad-pod-update-test.sh
|
||||
timeout: 30s
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: badpod
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- script:
|
||||
content: ./good-pod-update-test.sh
|
||||
timeout: 30s
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: TestStep
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: badtogoodpod
|
||||
spec:
|
||||
timeouts: {}
|
||||
try:
|
||||
- script:
|
||||
content: ./update-bad-pod-to-comply.sh
|
||||
timeout: 30s
|
|
@ -0,0 +1,40 @@
|
|||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||
kind: Test
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: enforce-validate-existing
|
||||
spec:
|
||||
steps:
|
||||
- name: step-01
|
||||
try:
|
||||
- apply:
|
||||
file: bad-pod.yaml
|
||||
- assert:
|
||||
file: bad-pod-ready.yaml
|
||||
- name: step-02
|
||||
try:
|
||||
- apply:
|
||||
file: policy.yaml
|
||||
- assert:
|
||||
file: policy-ready.yaml
|
||||
- name: step-03
|
||||
try:
|
||||
- apply:
|
||||
file: good-pod.yaml
|
||||
- assert:
|
||||
file: good-pod-ready.yaml
|
||||
- name: step-04
|
||||
try:
|
||||
- script:
|
||||
content: ./bad-pod-update-test.sh
|
||||
timeout: 30s
|
||||
- name: step-05
|
||||
try:
|
||||
- script:
|
||||
content: ./good-pod-update-test.sh
|
||||
timeout: 30s
|
||||
- name: step-06
|
||||
try:
|
||||
- script:
|
||||
content: ./update-bad-pod-to-comply.sh
|
||||
timeout: 30s
|
Loading…
Reference in a new issue