Skip to content

Commit c92828c

Browse files
committed
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 <[email protected]>
1 parent d45eb9b commit c92828c

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

‎hack/e2e-chainsaw/kafka/chainsaw-test.yaml‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#
33
# The final step replaces the BATS check that Strimzi reclaims the ZooKeeper
44
# PVCs on delete: instead of a manual kubectl delete, an explicit delete of the
5-
# Kafka CR followed by `error` ops asserts both PVCs disappear (a regression in
6-
# the operator's deleteClaim handling would leave them behind).
5+
# Kafka CR followed by deletion watches asserts both PVCs disappear (a
6+
# regression in the operator's deleteClaim handling would leave them behind).
7+
# The Bound assertions below ensure both PVCs existed before deletion.
78
apiVersion: chainsaw.kyverno.io/v1alpha1
89
kind: Test
910
metadata:
@@ -99,17 +100,17 @@ spec:
99100
apiVersion: apps.cozystack.io/v1alpha1
100101
kind: Kafka
101102
name: test
102-
- error:
103+
- wait:
103104
timeout: 2m
104-
resource:
105-
apiVersion: v1
106-
kind: PersistentVolumeClaim
107-
metadata:
108-
name: data-kafka-test-zookeeper-0
109-
- error:
105+
apiVersion: v1
106+
kind: PersistentVolumeClaim
107+
name: data-kafka-test-zookeeper-0
108+
for:
109+
deletion: {}
110+
- wait:
110111
timeout: 2m
111-
resource:
112-
apiVersion: v1
113-
kind: PersistentVolumeClaim
114-
metadata:
115-
name: data-kafka-test-zookeeper-1
112+
apiVersion: v1
113+
kind: PersistentVolumeClaim
114+
name: data-kafka-test-zookeeper-1
115+
for:
116+
deletion: {}

0 commit comments

Comments
 (0)