From c8f40fe12ce5179356153f38278b533e6e21b12d Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Tue, 1 Jul 2025 18:13:29 -0300 Subject: [PATCH] tests/k8s: call teardown_common in k8s-sandbox-vcpus-allocation.bats The teardown_common will print the description of the running pods, kill them all and print the system's syslogs afterwards. Signed-off-by: Wainer dos Santos Moschetta --- .../integration/kubernetes/k8s-sandbox-vcpus-allocation.bats | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats b/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats index a59b4085a4..1dbc0a7c9b 100644 --- a/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats +++ b/tests/integration/kubernetes/k8s-sandbox-vcpus-allocation.bats @@ -6,6 +6,7 @@ # load "${BATS_TEST_DIRNAME}/../../common.bash" +load "${BATS_TEST_DIRNAME}/lib.sh" load "${BATS_TEST_DIRNAME}/tests_common.sh" setup() { @@ -14,11 +15,13 @@ setup() { [ "${KATA_HYPERVISOR}" = "qemu-runtime-rs" ] && skip "Requires CPU hotplug which isn't supported on ${KATA_HYPERVISOR} yet" [ "$(uname -m)" == "aarch64" ] && skip "See: https://github.com/kata-containers/kata-containers/issues/10928" + setup_common get_pod_config_dir pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" ) expected_vcpus=( 1 1 2 ) yaml_file="${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml" + set_node "$yaml_file" "$node" add_allow_all_policy_to_yaml "${yaml_file}" } @@ -45,5 +48,5 @@ teardown() { kubectl logs ${pod} done - kubectl delete -f "${yaml_file}" + teardown_common "${node}" "${node_start_time:-}" }