From 02a2f6a9c1e3116c0b11e826b7f985c9db6f8955 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Mon, 3 Mar 2025 15:16:08 +0000 Subject: [PATCH] tests: Sanitize `K8S_TEST_ENTRY` Now we've added the double quotes around `${K8S_TEST_UNION[@]}`, so platforms are failing with: ``` Error: Test file "/home/ubuntu/runner/_layout/_work/kata-containers/kata-containers/tests/integration/kubernetes/k8s-nginx-connectivity.bats " does not exist ``` due to the line continuation, so sanitise the value to try and fix this. Co-authored-by: Hyounggyu Choi Signed-off-by: stevenhorsman --- tests/integration/kubernetes/run_kubernetes_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/kubernetes/run_kubernetes_tests.sh b/tests/integration/kubernetes/run_kubernetes_tests.sh index 0d39d12c5e..a62dcfe073 100755 --- a/tests/integration/kubernetes/run_kubernetes_tests.sh +++ b/tests/integration/kubernetes/run_kubernetes_tests.sh @@ -134,6 +134,7 @@ info "Running tests with bats version: $(bats --version)" tests_fail=() for K8S_TEST_ENTRY in "${K8S_TEST_UNION[@]}" do + K8S_TEST_ENTRY=$(echo "$K8S_TEST_ENTRY" | tr -d '[:space:][:cntrl:]') info "$(kubectl get pods --all-namespaces 2>&1)" info "Executing ${K8S_TEST_ENTRY}" if ! bats --show-output-of-passing-tests "${K8S_TEST_ENTRY}"; then