diff options
author | Todd Malsbary <todd.malsbary@intel.com> | 2022-01-19 13:54:14 -0800 |
---|---|---|
committer | Todd Malsbary <todd.malsbary@intel.com> | 2022-01-19 13:54:14 -0800 |
commit | 1f92a0ec4ea037089b82e3f80bb030f34fab64f0 (patch) | |
tree | 1a245e9f2a605910c8cec327d06165d6a532946a /kud/tests/topology-manager-sriov.sh | |
parent | 0dd494c4953bf9f910bc1d16fe96db83f03f2fb7 (diff) |
Use kubectl wait in KuD wait_for_pod test function
This handles intermittent Err* Pod status such as ErrImagePull.
Additionally, remove the duplication of wait_for_pod among the tests.
Issue-ID: MULTICLOUD-1435
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I70c69e0427b80e31b2f97515ebdbc3496a91ced1
Diffstat (limited to 'kud/tests/topology-manager-sriov.sh')
-rwxr-xr-x | kud/tests/topology-manager-sriov.sh | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/kud/tests/topology-manager-sriov.sh b/kud/tests/topology-manager-sriov.sh index 447a7c83..48a1b876 100755 --- a/kud/tests/topology-manager-sriov.sh +++ b/kud/tests/topology-manager-sriov.sh @@ -61,20 +61,7 @@ create_pod_yaml ${csar_id} kubectl delete pod $pod_name --ignore-not-found=true --now --wait kubectl create -f ${CSAR_DIR}/${csar_id}/$pod_name.yaml --validate=false -status_phase="" -while [[ $status_phase != "Running" ]]; do - new_phase=$(kubectl get pods $pod_name | awk 'NR==2{print $3}') - if [[ $new_phase != $status_phase ]]; then - echo "$(date +%H:%M:%S) - $pod_name : $new_phase" - status_phase=$new_phase - fi - if [[ $new_phase == "Running" ]]; then - echo "Pod is up and running.." - fi - if [[ $new_phase == "Err"* ]]; then - exit 1 - fi -done +wait_for_pod $pod_name uid=$(kubectl get pod pod-topology-manager -o jsonpath='{.metadata.uid}') node_name=$(kubectl get pod $pod_name -o jsonpath='{.spec.nodeName}') |