1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 02:18:15 +00:00

[Fix] flakes in e2e tests (#8253)

* fix small errors

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix ns

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fixes

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* drop sleep

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* update readme

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* typo

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fixes

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* intendation

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

---------

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Shubham Gupta 2023-09-04 23:11:34 +05:30 committed by GitHub
parent 90d84d81b2
commit d615826a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 38 additions and 6 deletions

View file

@ -1,6 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
apply:
- pod.yaml
assert:
- pod-assert.yaml
- pod.yaml

View file

@ -0,0 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: sleep 5
error:
- pod-assert.yaml

View file

@ -0,0 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
apply:
- pod-2.yaml
assert:
- pod-assert-2.yaml

View file

@ -1,4 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: sleep 5
apply:
- past-timestamp.yaml

View file

@ -1,4 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
error:
- pod-assert.yaml
- pod-assert-2.yaml

View file

@ -6,4 +6,8 @@ This test cleans up pods instanteaously without any delay as the value of the la
The pod `test-pod` is cleaned up instantaneously.
The pod `test-pod-2` is cleaned up instantaneously when the label is updated to `cleanup.kyverno.io/ttl: 2023-07-19T120000Z` the timestamp is mentioned in past.
## Reference Issue(s)
- [8242](https://github.com/kyverno/kyverno/issues/8242): `test-pod` might never be created, so the assert could fail.

View file

@ -0,0 +1,6 @@
apiVersion: v1
kind: Pod
metadata:
name: test-pod-2
labels:
cleanup.kyverno.io/ttl: 2023-07-19T120000Z

View file

@ -0,0 +1,8 @@
apiVersion: v1
kind: Pod
metadata:
name: test-pod-2
spec:
containers:
- image: nginx:latest
name: nginx

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Pod
metadata:
name: test-pod-2