From c6b86e88e4e89672e333ffb48c415903edbfe526 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Tue, 3 Sep 2024 13:22:20 +0200 Subject: [PATCH] tests: Increase timeouts for qemu-coco-dev in trusted image storage tests Timeouts occur (e.g. `create_container_timeout` and `wait_time`) when using qemu-coco-dev. This commit increases these timeouts for the trusted image storage test cases Signed-off-by: Hyounggyu Choi --- .../kubernetes/k8s-guest-pull-image.bats | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/integration/kubernetes/k8s-guest-pull-image.bats b/tests/integration/kubernetes/k8s-guest-pull-image.bats index 2de58bd36e..46381810a9 100644 --- a/tests/integration/kubernetes/k8s-guest-pull-image.bats +++ b/tests/integration/kubernetes/k8s-guest-pull-image.bats @@ -110,6 +110,15 @@ setup() { pod_config=$(mktemp "${BATS_FILE_TMPDIR}/$(basename "${pod_config_template}").XXX") IMAGE="$image_pulled_time_less_than_default_time" NODE_NAME="$node" envsubst < "$pod_config_template" > "$pod_config" + + # Set CreateContainerRequest timeout for qemu-coco-dev + if [ "${KATA_HYPERVISOR}" == "qemu-coco-dev" ]; then + create_container_timeout=300 + set_metadata_annotation "$pod_config" \ + "io.katacontainers.config.runtime.create_container_timeout" \ + "${create_container_timeout}" + fi + # Enable dm-integrity in guest set_metadata_annotation "${pod_config}" \ "io.katacontainers.config.hypervisor.kernel_params" \ @@ -125,7 +134,9 @@ setup() { cat $pod_config add_allow_all_policy_to_yaml "$pod_config" - k8s_create_pod "$pod_config" + local wait_time=120 + [ "${KATA_HYPERVISOR}" == "qemu-coco-dev" ] && wait_time=300 + k8s_create_pod "$pod_config" "$wait_time" } @test "Test we cannot pull a large image that pull time exceeds createcontainer timeout inside the guest" { @@ -195,6 +206,7 @@ setup() { # Set CreateContainerRequest timeout in the annotation to pull large image in guest create_container_timeout=120 + [ "${KATA_HYPERVISOR}" == "qemu-coco-dev" ] && create_container_timeout=600 set_metadata_annotation "$pod_config" \ "io.katacontainers.config.runtime.create_container_timeout" \ "${create_container_timeout}" @@ -214,7 +226,9 @@ setup() { cat $pod_config add_allow_all_policy_to_yaml "$pod_config" - k8s_create_pod "$pod_config" + local wait_time=120 + [ "${KATA_HYPERVISOR}" == "qemu-coco-dev" ] && wait_time=600 + k8s_create_pod "$pod_config" "$wait_time" } teardown() {