mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 02:45:06 +00:00
Update kuttl test scaffolding (#5303)
* add test instructions Signed-off-by: Chip Zoller <chipzoller@gmail.com> * update scaffolding Signed-off-by: Chip Zoller <chipzoller@gmail.com> Signed-off-by: Chip Zoller <chipzoller@gmail.com> Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
parent
7a15231a1c
commit
67f7d7af24
7 changed files with 22 additions and 7 deletions
test/conformance/kuttl/aaa_template_resources
|
@ -1,6 +1,6 @@
|
|||
# Some Best Practices
|
||||
|
||||
* Don't put anything in index `00` so it can be used in the future.
|
||||
* Put clean-up as index `99` so it's always last no matter how many steps.
|
||||
* A final clean-up stage/file is not needed unless a resource was created using a Script. Use scripts sparingly!
|
||||
* The `*-errors.yaml` file, like an `*-assert.yaml` file only performs an existence check, not a creation check.
|
||||
* One test can contain both positive and negative tests by extending the test case. No need to write separate.
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kuttl.dev/v1beta1
|
||||
kind: TestStep
|
||||
apply:
|
||||
- policy.yaml
|
||||
assert:
|
||||
- policy-ready.yaml
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kuttl.dev/v1beta1
|
||||
kind: TestStep
|
||||
apply:
|
||||
- resource.yaml
|
||||
assert:
|
||||
- resource-mutated.yaml
|
|
@ -1,4 +0,0 @@
|
|||
apiVersion: kuttl.dev/v1beta1
|
||||
kind: TestStep
|
||||
commands:
|
||||
- command: kubectl delete -f 01-manifests.yaml --force --wait=true --ignore-not-found=true
|
|
@ -6,4 +6,4 @@ status:
|
|||
conditions:
|
||||
- reason: Succeeded
|
||||
status: "True"
|
||||
type: Ready
|
||||
type: Ready
|
|
@ -16,4 +16,4 @@ spec:
|
|||
patchStrategicMerge:
|
||||
metadata:
|
||||
labels:
|
||||
foo: bar
|
||||
foo: bar
|
|
@ -0,0 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: testingsecret
|
||||
namespace: default
|
||||
labels:
|
||||
foo: bar
|
Loading…
Add table
Reference in a new issue