From 96d41b6349ad391a5059c0fa1b208a6182aaf09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Thu, 7 May 2026 05:13:40 +0800 Subject: [PATCH] test(helm): cover standalone scale-to-zero rendering (#2831) --- scripts/test_helm_templates.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/test_helm_templates.sh b/scripts/test_helm_templates.sh index 0e7dc2297..b9b0edde8 100755 --- a/scripts/test_helm_templates.sh +++ b/scripts/test_helm_templates.sh @@ -33,6 +33,10 @@ fi rolling_output=$(render_standalone_deployment) grep -q "type: RollingUpdate" <<<"$rolling_output" grep -q "rollingUpdate:" <<<"$rolling_output" +grep -Eq '^[[:space:]]*replicas:[[:space:]]*1[[:space:]]*$' <<<"$rolling_output" + +scaled_to_zero_output=$(render_standalone_deployment --set replicaCount=0) +grep -Eq '^[[:space:]]*replicas:[[:space:]]*0[[:space:]]*$' <<<"$scaled_to_zero_output" # Fail-closed credential checks. Rendering must fail when no credentials, # existingSecret, or allowInsecureDefaults override is supplied.