mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-01 20:06:35 +00:00
Merge pull request #10202 from BbolroC/fix-k8s-tests-s390x
tests: Fix k8s test issues on s390x
This commit is contained in:
commit
4cd83d2b98
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
load "${BATS_TEST_DIRNAME}/lib.sh"
|
load "${BATS_TEST_DIRNAME}/lib.sh"
|
||||||
load "${BATS_TEST_DIRNAME}/confidential_common.sh"
|
load "${BATS_TEST_DIRNAME}/confidential_common.sh"
|
||||||
|
load "${BATS_TEST_DIRNAME}/confidential_kbs.sh"
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
if ! is_confidential_runtime_class; then
|
if ! is_confidential_runtime_class; then
|
||||||
|
@ -37,9 +37,11 @@ k8s_wait_pod_be_ready() {
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $1 - the pod configuration file.
|
# $1 - the pod configuration file.
|
||||||
|
# $2 - wait time in seconds. Defaults to 120. (optional)
|
||||||
#
|
#
|
||||||
k8s_create_pod() {
|
k8s_create_pod() {
|
||||||
local config_file="$1"
|
local config_file="$1"
|
||||||
|
local wait_time="${2:-120}"
|
||||||
local pod_name=""
|
local pod_name=""
|
||||||
|
|
||||||
if [ ! -f "${config_file}" ]; then
|
if [ ! -f "${config_file}" ]; then
|
||||||
@ -53,11 +55,11 @@ k8s_create_pod() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
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
|
# TODO: run this command for debugging. Maybe it should be
|
||||||
# guarded by DEBUG=true?
|
# guarded by DEBUG=true?
|
||||||
kubectl get pods "$pod_name"
|
kubectl get pods "${pod_name}"
|
||||||
kubectl describe pod "$pod_name"
|
kubectl describe pod "${pod_name}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user