From cf049fc718440f2044d70826e2afa9ca11e43c54 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 6 Feb 2024 16:04:31 +0000 Subject: [PATCH] k8s: Skip k8s tests that are not working This PR skips the k8s tests that are not working with cloud hypervisor runtime-rs with its proper issue. Signed-off-by: Gabriela Cervantes --- tests/integration/kubernetes/gha-run.sh | 1 + tests/integration/kubernetes/k8s-cpu-ns.bats | 5 ++--- tests/integration/kubernetes/k8s-number-cpus.bats | 2 ++ .../integration/kubernetes/k8s-sandbox-vcpus-allocation.bats | 4 ++-- tests/integration/kubernetes/k8s-scale-nginx.bats | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index f1308b87d..f2e86a552 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -174,6 +174,7 @@ function run_tests() { pushd "${kubernetes_dir}" bash setup.sh if [[ "${KATA_HYPERVISOR}" = "dragonball" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]] || [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]]; then + # cloud-hypervisor runtime-rs issue is https://github.com/kata-containers/kata-containers/issues/9034 echo "Skipping tests for $KATA_HYPERVISOR using devmapper" else bash run_kubernetes_tests.sh diff --git a/tests/integration/kubernetes/k8s-cpu-ns.bats b/tests/integration/kubernetes/k8s-cpu-ns.bats index 07b3dd164..9035e6be8 100644 --- a/tests/integration/kubernetes/k8s-cpu-ns.bats +++ b/tests/integration/kubernetes/k8s-cpu-ns.bats @@ -10,9 +10,9 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh" setup() { [ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}" - [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "test not working https://github.com/kata-containers/kata-containers/issues/8965" [ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}" [ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_limitations}" + [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "https://github.com/kata-containers/kata-containers/issues/9039" ( [ "${KATA_HYPERVISOR}" == "qemu-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \ [ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \ && skip "TEEs do not support memory / CPU hotplug" @@ -31,7 +31,6 @@ setup() { } @test "Check CPU constraints" { - [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "test not working https://github.com/kata-containers/kata-containers/issues/8965" # Create the pod kubectl create -f "${pod_config_dir}/pod-cpu.yaml" @@ -74,9 +73,9 @@ setup() { teardown() { [ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}" - [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "test not working https://github.com/kata-containers/kata-containers/issues/8965" [ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}" [ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_limitations}" + [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "https://github.com/kata-containers/kata-containers/issues/9039" ( [ "${KATA_HYPERVISOR}" == "qemu-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \ [ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \ && skip "TEEs do not support memory / CPU hotplug" diff --git a/tests/integration/kubernetes/k8s-number-cpus.bats b/tests/integration/kubernetes/k8s-number-cpus.bats index 338963f6d..bff379e3e 100644 --- a/tests/integration/kubernetes/k8s-number-cpus.bats +++ b/tests/integration/kubernetes/k8s-number-cpus.bats @@ -9,6 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash" load "${BATS_TEST_DIRNAME}/tests_common.sh" setup() { + [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039" pod_name="cpu-test" container_name="c1" get_pod_config_dir @@ -40,6 +41,7 @@ setup() { } teardown() { + [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039" # Debugging information kubectl describe "pod/$pod_name" diff --git a/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats b/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats index e39ba044b..d10ed95ce 100644 --- a/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats +++ b/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats @@ -10,7 +10,7 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh" setup() { [ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ]&& \ - skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test" + skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660" get_pod_config_dir pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" ) @@ -30,7 +30,7 @@ setup() { teardown() { [ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \ - skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test" + skip "runtime-rs is still using the old vcpus allocation algorithm, skipping the test see https://github.com/kata-containers/kata-containers/issues/8660" for pod in "${pods[@]}"; do kubectl logs ${pod} diff --git a/tests/integration/kubernetes/k8s-scale-nginx.bats b/tests/integration/kubernetes/k8s-scale-nginx.bats index 81b172b85..3f11236f3 100644 --- a/tests/integration/kubernetes/k8s-scale-nginx.bats +++ b/tests/integration/kubernetes/k8s-scale-nginx.bats @@ -17,6 +17,7 @@ setup() { } @test "Scale nginx deployment" { + sed -e "s/\${nginx_version}/${nginx_image}/" \ "${pod_config_dir}/${deployment}.yaml" > "${pod_config_dir}/test-${deployment}.yaml"