Skip to content

Commit b2e233b

Browse files
committed
test(monitoring): assert VTCluster/VTSingle readiness-gate entries
Address branch-review coverage gap: helmrelease_test.yaml pinned only healthCheckExprs[0] (VLCluster), but the PR adds [1] (VTCluster) and [2] (VTSingle) — the load-bearing change that closes the #3181 'Ready with no store' hole for traces. Assert both new entries (apiVersion/kind/current/ inProgress/failed) so a dropped/reordered block or a typo'd CEL expression fails a test instead of silently regressing the gate. Signed-off-by: Alexey Artamonov <[email protected]>
1 parent ae60c05 commit b2e233b

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

‎packages/extra/monitoring/tests/helmrelease_test.yaml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,44 @@ tests:
4242
- equal:
4343
path: spec.healthCheckExprs[0].failed
4444
value: "has(status.updateStatus) && status.updateStatus != 'operational' && status.updateStatus != 'expanding'"
45+
46+
# The traces backend (VTCluster/VTSingle from tracingStorages) is gated the
47+
# same way and by the same operator status contract, closing the same
48+
# "Ready with no store" hole (#3181) for traces. Pin both entries so a
49+
# dropped/reordered block or a typo'd CEL expression fails a test rather than
50+
# silently regressing the gate.
51+
- it: gates readiness on the VTCluster status.updateStatus
52+
asserts:
53+
- equal:
54+
path: spec.healthCheckExprs[1].apiVersion
55+
value: operator.victoriametrics.com/v1
56+
- equal:
57+
path: spec.healthCheckExprs[1].kind
58+
value: VTCluster
59+
- equal:
60+
path: spec.healthCheckExprs[1].current
61+
value: "has(status.updateStatus) && status.updateStatus == 'operational'"
62+
- equal:
63+
path: spec.healthCheckExprs[1].inProgress
64+
value: "has(status.updateStatus) && status.updateStatus == 'expanding'"
65+
- equal:
66+
path: spec.healthCheckExprs[1].failed
67+
value: "has(status.updateStatus) && status.updateStatus != 'operational' && status.updateStatus != 'expanding'"
68+
69+
- it: gates readiness on the VTSingle status.updateStatus
70+
asserts:
71+
- equal:
72+
path: spec.healthCheckExprs[2].apiVersion
73+
value: operator.victoriametrics.com/v1
74+
- equal:
75+
path: spec.healthCheckExprs[2].kind
76+
value: VTSingle
77+
- equal:
78+
path: spec.healthCheckExprs[2].current
79+
value: "has(status.updateStatus) && status.updateStatus == 'operational'"
80+
- equal:
81+
path: spec.healthCheckExprs[2].inProgress
82+
value: "has(status.updateStatus) && status.updateStatus == 'expanding'"
83+
- equal:
84+
path: spec.healthCheckExprs[2].failed
85+
value: "has(status.updateStatus) && status.updateStatus != 'operational' && status.updateStatus != 'expanding'"

0 commit comments

Comments
 (0)