test(computeplane): forward an explicit zero and the int32 maximum of maxUnavailable

An explicit 0 is what overrides the pool chart's default of 1 for GPU pools, so it must reach the pool unchanged rather than be dropped as an empty value. The int32 maximum is the largest value the schema accepts and must be forwarded as is.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit 28b66bbc63)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
This commit is contained in:
Mattia Eleuteri authored and Myasnikov Daniil committed 2026-11-25 09:58:10 +00:00
1 parent 8b6655e9ee
commit 6ad83b120a
1 file changed
+38
@@ -301,6 +301,44 @@ tests:
path: spec.values.maxUnavailable
value: 1
# An explicit 0 must reach the pool chart: there it overrides the 1 a GPU
# pool gets by default, so dropping it as empty would change the strategy.
- it: forwards an explicit maxUnavailable of 0 to the pool chart
documentSelector:
path: metadata.name
value: kubernetes-nodes-computeplane-cluster-md0
set:
nodeGroups:
md0:
minReplicas: 1
maxReplicas: 3
instanceType: u1.large
diskSize: 32Gi
roles: ["ingress-nginx"]
maxUnavailable: 0
asserts:
- equal:
path: spec.values.maxUnavailable
value: 0
- it: forwards the int32 maximum to the pool chart
documentSelector:
path: metadata.name
value: kubernetes-nodes-computeplane-cluster-md0
set:
nodeGroups:
md0:
minReplicas: 1
maxReplicas: 3
instanceType: u1.large
diskSize: 32Gi
roles: ["ingress-nginx"]
maxUnavailable: 2147483647
asserts:
- equal:
path: spec.values.maxUnavailable
value: 2147483647
- it: refuses a maxUnavailable above the int32 range CAPI decodes
set:
nodeGroups: