From 5bd8be3ae1f316253f2122863180d348aca2a964 Mon Sep 17 00:00:00 2001 From: ChandonPierre <80500072+ChandonPierre@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:20:07 -0400 Subject: [PATCH] add tests to ensure GO envs are not set when limits are not defined --- traefik/tests/pod-config_test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/traefik/tests/pod-config_test.yaml b/traefik/tests/pod-config_test.yaml index 8560d558c..f6b99402f 100644 --- a/traefik/tests/pod-config_test.yaml +++ b/traefik/tests/pod-config_test.yaml @@ -29,6 +29,16 @@ tests: - equal: path: spec.template.spec.containers[0].env[0].valueFrom.resourceFieldRef.resource value: limits.memory + - it: should have not set GOMAXPROCS without cpu limit + asserts: + - notEqual: + path: spec.template.spec.containers[0].env[0].name + value: GOMAXPROCS + - it: should have not set GOMEMLIMIT without cpu limit + asserts: + - notEqual: + path: spec.template.spec.containers[0].env[0].name + value: GOMEMLIMIT - it: should have env with specified values set: env: