mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
tests: k8s: Wait for all pods concurrently
A single invocation of `kubectl wait` can handle all pods. Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
bb4c608b32
commit
f89120662d
@ -21,9 +21,11 @@ setup() {
|
|||||||
# Create the pods
|
# Create the pods
|
||||||
kubectl create -f "${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml"
|
kubectl create -f "${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml"
|
||||||
|
|
||||||
|
# Wait for completion
|
||||||
|
kubectl wait --for=jsonpath='{.status.conditions[0].reason}'=PodCompleted --timeout=$timeout pod --all
|
||||||
|
|
||||||
# Check the pods
|
# Check the pods
|
||||||
for i in {0..2}; do
|
for i in {0..2}; do
|
||||||
kubectl wait --for=jsonpath='{.status.conditions[0].reason}'=PodCompleted --timeout=$timeout pod ${pods[$i]}
|
|
||||||
[ `kubectl logs ${pods[$i]}` -eq ${expected_vcpus[$i]} ]
|
[ `kubectl logs ${pods[$i]}` -eq ${expected_vcpus[$i]} ]
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user