From 1aa038cb4791abc1dc9fb8b8aee020380d45fb57 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2026 06:16:09 +0000 Subject: [PATCH] test(helm): cover fixed replicaCount on component deployments Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- helm/litellm/tests/replica_count_tests.yaml | 63 +++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 helm/litellm/tests/replica_count_tests.yaml diff --git a/helm/litellm/tests/replica_count_tests.yaml b/helm/litellm/tests/replica_count_tests.yaml new file mode 100644 index 00000000000..4bde84a2344 --- /dev/null +++ b/helm/litellm/tests/replica_count_tests.yaml @@ -0,0 +1,63 @@ +suite: test fixed replica count on the component deployments +templates: + - gateway/deployment.yaml + - gateway/configmap.yaml + - backend/deployment.yaml + - ui/deployment.yaml +values: + - ./values/required.yaml +tests: + - it: renders replicaCount as spec.replicas when the component HPA is disabled + set: + gateway.hpa.enabled: false + gateway.replicaCount: 3 + backend.hpa.enabled: false + backend.replicaCount: 2 + ui.hpa.enabled: false + ui.replicaCount: 4 + asserts: + - equal: + path: spec.replicas + value: 3 + template: gateway/deployment.yaml + - equal: + path: spec.replicas + value: 2 + template: backend/deployment.yaml + - equal: + path: spec.replicas + value: 4 + template: ui/deployment.yaml + + - it: leaves spec.replicas to the HPA when the component HPA is enabled + set: + gateway.hpa.enabled: true + gateway.replicaCount: 3 + backend.hpa.enabled: true + backend.replicaCount: 2 + ui.hpa.enabled: true + ui.replicaCount: 4 + asserts: + - notExists: + path: spec.replicas + template: gateway/deployment.yaml + - notExists: + path: spec.replicas + template: backend/deployment.yaml + - notExists: + path: spec.replicas + template: ui/deployment.yaml + + - it: pins one component while another stays autoscaled + set: + gateway.hpa.enabled: false + gateway.replicaCount: 5 + backend.hpa.enabled: true + asserts: + - equal: + path: spec.replicas + value: 5 + template: gateway/deployment.yaml + - notExists: + path: spec.replicas + template: backend/deployment.yaml