mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-05 11:37:31 +09:00
test(kafka): watch PVC deletion in the release-1.6 E2E suite
Replace negative Chainsaw assertions with deletion watches, keeping the two-minute timeout and the preceding Bound assertions for both PVCs. Chainsaw 0.2.15 can abort polling on an API read error and report its previous "resource matches expectation" instead. The failed #4402 run ended this check after 4.5 seconds, not its two-minute budget. Verified with Chainsaw 0.2.15 and kubectl 1.33.13 against a loopback API: delayed deletion, already absent, a read failure on the old polling path, and watch reconnect succeed; retained PVCs and forbidden reads fail. Chainsaw lint passes. The original CI API error was not preserved; a full E2E rerun is still needed. Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
This commit is contained in:
1 parent
d45eb9bfec
commit
c92828ce9d
1 file changed
+15
-14
@@ -2,8 +2,9 @@
|
|||||||
#
|
#
|
||||||
# The final step replaces the BATS check that Strimzi reclaims the ZooKeeper
|
# The final step replaces the BATS check that Strimzi reclaims the ZooKeeper
|
||||||
# PVCs on delete: instead of a manual kubectl delete, an explicit delete of the
|
# PVCs on delete: instead of a manual kubectl delete, an explicit delete of the
|
||||||
# Kafka CR followed by `error` ops asserts both PVCs disappear (a regression in
|
# Kafka CR followed by deletion watches asserts both PVCs disappear (a
|
||||||
# the operator's deleteClaim handling would leave them behind).
|
# regression in the operator's deleteClaim handling would leave them behind).
|
||||||
|
# The Bound assertions below ensure both PVCs existed before deletion.
|
||||||
apiVersion: chainsaw.kyverno.io/v1alpha1
|
apiVersion: chainsaw.kyverno.io/v1alpha1
|
||||||
kind: Test
|
kind: Test
|
||||||
metadata:
|
metadata:
|
||||||
@@ -99,17 +100,17 @@ spec:
|
|||||||
apiVersion: apps.cozystack.io/v1alpha1
|
apiVersion: apps.cozystack.io/v1alpha1
|
||||||
kind: Kafka
|
kind: Kafka
|
||||||
name: test
|
name: test
|
||||||
- error:
|
- wait:
|
||||||
timeout: 2m
|
timeout: 2m
|
||||||
resource:
|
apiVersion: v1
|
||||||
apiVersion: v1
|
kind: PersistentVolumeClaim
|
||||||
kind: PersistentVolumeClaim
|
name: data-kafka-test-zookeeper-0
|
||||||
metadata:
|
for:
|
||||||
name: data-kafka-test-zookeeper-0
|
deletion: {}
|
||||||
- error:
|
- wait:
|
||||||
timeout: 2m
|
timeout: 2m
|
||||||
resource:
|
apiVersion: v1
|
||||||
apiVersion: v1
|
kind: PersistentVolumeClaim
|
||||||
kind: PersistentVolumeClaim
|
name: data-kafka-test-zookeeper-1
|
||||||
metadata:
|
for:
|
||||||
name: data-kafka-test-zookeeper-1
|
deletion: {}
|
||||||
Reference in new issue
Block a user