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 <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2024-02-06 16:04:31 +00:00
parent eb5b7d3bf8
commit cf049fc718
5 changed files with 8 additions and 5 deletions

View File

@ -174,6 +174,7 @@ function run_tests() {
pushd "${kubernetes_dir}" pushd "${kubernetes_dir}"
bash setup.sh bash setup.sh
if [[ "${KATA_HYPERVISOR}" = "dragonball" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]] || [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]]; then 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" echo "Skipping tests for $KATA_HYPERVISOR using devmapper"
else else
bash run_kubernetes_tests.sh bash run_kubernetes_tests.sh

View File

@ -10,9 +10,9 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() { setup() {
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}" [ "${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}" == "fc" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_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-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \
[ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \ [ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \
&& skip "TEEs do not support memory / CPU hotplug" && skip "TEEs do not support memory / CPU hotplug"
@ -31,7 +31,6 @@ setup() {
} }
@test "Check CPU constraints" { @test "Check CPU constraints" {
[ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && skip "test not working https://github.com/kata-containers/kata-containers/issues/8965"
# Create the pod # Create the pod
kubectl create -f "${pod_config_dir}/pod-cpu.yaml" kubectl create -f "${pod_config_dir}/pod-cpu.yaml"
@ -74,9 +73,9 @@ setup() {
teardown() { teardown() {
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}" [ "${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}" == "fc" ] && skip "test not working see: ${fc_limitations}"
[ "${KATA_HYPERVISOR}" == "dragonball" ] && skip "test not working see: ${dragonball_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-tdx" ] || [ "${KATA_HYPERVISOR}" == "qemu-snp" ] || \
[ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \ [ "${KATA_HYPERVISOR}" == "qemu-sev" ] || [ "${KATA_HYPERVISOR}" == "qemu-se" ] ) \
&& skip "TEEs do not support memory / CPU hotplug" && skip "TEEs do not support memory / CPU hotplug"

View File

@ -9,6 +9,7 @@ load "${BATS_TEST_DIRNAME}/../../common.bash"
load "${BATS_TEST_DIRNAME}/tests_common.sh" load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() { setup() {
[[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039"
pod_name="cpu-test" pod_name="cpu-test"
container_name="c1" container_name="c1"
get_pod_config_dir get_pod_config_dir
@ -40,6 +41,7 @@ setup() {
} }
teardown() { teardown() {
[[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]]&& skip "test not working https://github.com/kata-containers/kata-containers/issues/9039"
# Debugging information # Debugging information
kubectl describe "pod/$pod_name" kubectl describe "pod/$pod_name"

View File

@ -10,7 +10,7 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() { setup() {
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ]&& \ [ "${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 get_pod_config_dir
pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" ) 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() { teardown() {
[ "${KATA_HYPERVISOR}" == "dragonball" ] || [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ] && \ [ "${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 for pod in "${pods[@]}"; do
kubectl logs ${pod} kubectl logs ${pod}

View File

@ -17,6 +17,7 @@ setup() {
} }
@test "Scale nginx deployment" { @test "Scale nginx deployment" {
sed -e "s/\${nginx_version}/${nginx_image}/" \ sed -e "s/\${nginx_version}/${nginx_image}/" \
"${pod_config_dir}/${deployment}.yaml" > "${pod_config_dir}/test-${deployment}.yaml" "${pod_config_dir}/${deployment}.yaml" > "${pod_config_dir}/test-${deployment}.yaml"