mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-09 00:47:30 +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
tests/integration/kubernetes
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user