summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2018-07-30 08:46:51 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2018-07-30 08:46:51 -0700
commita0cf8feb0c69ff1ea6c43539b89893ad5139429c (patch)
tree2aabb49adfe3addfdf2d2e8944c3b0ffb0b0fafd
parent76d3a9260bb9df6531625e1558db2e9ca42a9578 (diff)
Further fixes to service test logicHEADmaster
JIRA: MODELS-2 Change-Id: I7cd71f7f914daf35d3c5090b994aedfa4762fc10 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r--tools/kubernetes/helm-tools.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/kubernetes/helm-tools.sh b/tools/kubernetes/helm-tools.sh
index 0572fe9..fff9a4d 100644
--- a/tools/kubernetes/helm-tools.sh
+++ b/tools/kubernetes/helm-tools.sh
@@ -72,7 +72,6 @@ function setup_helm() {
function wait_for_service() {
log "Waiting for service $1 to be available"
- # TODO: fix 'head' workaround for more than one pod per service
pods=$(kubectl get pods --namespace default | awk "/$1/ { print \$1 }")
log "Service $1 is at pod(s) $pods"
ready="false"
@@ -80,10 +79,9 @@ function wait_for_service() {
log "Waiting 10 seconds to check pod status"
sleep 10
for pod in $pods ; do
- ready=$(kubectl get pods --namespace default -o jsonpath='{.status.containerStatuses[0].ready}' $pod)
- if [[ "$ready" != "true" ]]; then
- log "pod $1 is $ready"
- fi
+ rdy=$(kubectl get pods --namespace default -o jsonpath='{.status.containerStatuses[0].ready}' $pod)
+ log "pod $pod is ready: $rdy"
+ if [[ "$rdy" == "true" ]]; then ready="true"; fi
done
done
log "pod $pod is ready"