1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-09 00:47:30 +00:00

Merge pull request from BbolroC/fix-k8s-tests-s390x

tests: Fix k8s test issues on s390x
This commit is contained in:
Hyounggyu Choi 2024-08-23 09:51:11 +02:00 committed by GitHub
commit 4cd83d2b98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions
tests/integration/kubernetes

View File

@ -7,6 +7,7 @@
load "${BATS_TEST_DIRNAME}/lib.sh"
load "${BATS_TEST_DIRNAME}/confidential_common.sh"
load "${BATS_TEST_DIRNAME}/confidential_kbs.sh"
setup() {
if ! is_confidential_runtime_class; then

View File

@ -37,9 +37,11 @@ k8s_wait_pod_be_ready() {
#
# Parameters:
# $1 - the pod configuration file.
# $2 - wait time in seconds. Defaults to 120. (optional)
#
k8s_create_pod() {
local config_file="$1"
local wait_time="${2:-120}"
local pod_name=""
if [ ! -f "${config_file}" ]; then
@ -53,11 +55,11 @@ k8s_create_pod() {
return 1
fi
if ! k8s_wait_pod_be_ready "$pod_name"; then
if ! k8s_wait_pod_be_ready "${pod_name}" "${wait_time}"; then
# TODO: run this command for debugging. Maybe it should be
# guarded by DEBUG=true?
kubectl get pods "$pod_name"
kubectl describe pod "$pod_name"
kubectl get pods "${pod_name}"
kubectl describe pod "${pod_name}"
return 1
fi
}