aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/topology-manager.sh
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2022-01-19 13:54:14 -0800
committerTodd Malsbary <todd.malsbary@intel.com>2022-01-19 13:54:14 -0800
commit1f92a0ec4ea037089b82e3f80bb030f34fab64f0 (patch)
tree1a245e9f2a605910c8cec327d06165d6a532946a /kud/tests/topology-manager.sh
parent0dd494c4953bf9f910bc1d16fe96db83f03f2fb7 (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.sh')
-rwxr-xr-xkud/tests/topology-manager.sh15
1 files changed, 1 insertions, 14 deletions
diff --git a/kud/tests/topology-manager.sh b/kud/tests/topology-manager.sh
index 772dcfed..a1cd7b73 100755
--- a/kud/tests/topology-manager.sh
+++ b/kud/tests/topology-manager.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}')