tests: k8s-policy-pod: avoid word splitting

Avoid potential word splitting when using array of command args array.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
Dan Mihai
2024-07-26 18:48:18 +00:00
parent 5546ce4031
commit 83056457d6

View File

@@ -64,7 +64,7 @@ wait_for_pod_ready() {
@test "Able to read env variables sourced from configmap using envFrom" {
wait_for_pod_ready
expected_env_var=$(kubectl exec "${pod_name}" -- ${exec_command[@]})
expected_env_var=$(kubectl exec "${pod_name}" -- "${exec_command[@]}")
[ "$expected_env_var" = "value-3" ] || fail "expected_env_var is not equal to value-3"
}