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:
Dan Mihai
2024-04-03 22:11:15 +00:00
parent c5c229b330
commit 3e72b3f360

View File

@@ -23,7 +23,7 @@ setup() {
kubectl apply -f "${yaml_file}"
# 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
pod_name=$(kubectl get pods --selector=job-name=$job_name --output=jsonpath='{.items[*].metadata.name}')