mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 20:08:54 +00:00
tests: k8s-job: wait for job successful create
Don't just verify SuccessfulCreate - wait for it if needed. Fixes: #9138 Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
@@ -23,7 +23,7 @@ setup() {
|
|||||||
kubectl apply -f "${yaml_file}"
|
kubectl apply -f "${yaml_file}"
|
||||||
|
|
||||||
# Verify job
|
# Verify job
|
||||||
kubectl describe jobs/"$job_name" | grep "SuccessfulCreate"
|
waitForProcess "$wait_time" "$sleep_time" "kubectl describe job $job_name | grep SuccessfulCreate"
|
||||||
|
|
||||||
# List pods that belong to the job
|
# List pods that belong to the job
|
||||||
pod_name=$(kubectl get pods --selector=job-name=$job_name --output=jsonpath='{.items[*].metadata.name}')
|
pod_name=$(kubectl get pods --selector=job-name=$job_name --output=jsonpath='{.items[*].metadata.name}')
|
||||||
|
Reference in New Issue
Block a user