Skip to content

Commit 31ead5f

Browse files
committed
fix(platform tests): make negated containsDocument assertions load-bearing with any: true
Seven platform-chart helm-unittest cases used a negated containsDocument without any: true. In that form the assertion negates 'every document matches', which any multi-document render satisfies, so the cases stayed green regardless of what the template emitted. Add any: true to each and drop the redundant documentIndex: -1, matching the correct form already in the tree (bundles_isp_hosted_dependency_closure_test.yaml:132). Fixes #3864 Proven by mutation: suppressing cozystack.velero emission now fails the velero-absent guard; force-emitting cozystack.ouroboros now fails the proxyProtocol-absent guard. Reverted run: 139/139 pass. Signed-off-by: Mehrdad Biukian Naeini <[email protected]>
1 parent 9c7bfb8 commit 31ead5f

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/core/platform/tests/bundles_proxy_protocol_lookup_nil_test.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ tests:
2828
apiVersion: cozystack.io/v1alpha1
2929
kind: Package
3030
name: cozystack.ouroboros
31+
any: true
3132
not: true
32-
documentIndex: -1
3333

3434
- it: renders cleanly with proxyProtocol true on a fresh cluster (lookup-nil happy path also irrelevant — render does not invoke lookup when proxyProtocol=true)
3535
set:

‎packages/core/platform/tests/bundles_proxy_protocol_lookup_test.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ tests:
5656
apiVersion: cozystack.io/v1alpha1
5757
kind: Package
5858
name: cozystack.ouroboros
59+
any: true
5960
not: true
60-
documentIndex: -1
6161

6262
- it: renders cleanly with proxyProtocol true when the Package CR exists (steady state)
6363
set:

‎packages/core/platform/tests/bundles_proxy_protocol_test.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ tests:
1818
apiVersion: cozystack.io/v1alpha1
1919
kind: Package
2020
name: cozystack.ouroboros
21+
any: true
2122
not: true
22-
documentIndex: -1
2323

2424
- it: leaves cozystack.ingress-application as the bare default Package when proxyProtocol is false
2525
set:
@@ -150,8 +150,8 @@ tests:
150150
apiVersion: cozystack.io/v1alpha1
151151
kind: Package
152152
name: cozystack.ouroboros
153+
any: true
153154
not: true
154-
documentIndex: -1
155155

156156
- it: renders cleanly with proxyProtocol=false and proxyProtocolAcknowledgeUnclean=true (operator acknowledged cleanup)
157157
set:

‎packages/core/platform/tests/bundles_velero_default_test.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ tests:
3737
apiVersion: cozystack.io/v1alpha1
3838
kind: Package
3939
name: cozystack.velero
40+
any: true
4041
not: true
4142
- containsDocument:
4243
apiVersion: cozystack.io/v1alpha1
4344
kind: Package
4445
name: cozystack.backupstrategy-controller
46+
any: true
4547
not: true

0 commit comments

Comments
 (0)