modifications to dcos test
@@ -38,22 +38,26 @@ ${remote_cp} "${DIR}/marathon.json" azureuser@${INSTANCE_NAME}.${LOCATION}.cloud
log "Configuring marathon.json"
${remote_exec} sed -i "s/{agentFQDN}/${agentFQDN}/g" marathon.json || (log "Failed to configure marathon.json"; exit 1)
+
log "Adding marathon app"
count=20
while (( $count > 0 )); do
log " ... counting down $count"
+ ${remote_exec} ./dcos marathon app list | grep /web
+ retval=$?
+ if [[ $retval -eq 0 ]]; then log "Marathon App successfully installed" && break; fi
${remote_exec} ./dcos marathon app add marathon.json
retval=$?
if [[ "$retval" == "0" ]]; then break; fi
sleep 15; count=$((count-1))
done
-if [[ "$retval" != "0" ]]; then
+if [[ $retval -ne 0 ]]; then
log "gave up waiting for marathon to be added"
exit -1
fi
# only need to teardown if app added successfully
-trap teardown EXIT
+#trap teardown EXIT
log "Validating marathon app"
count=0
@@ -64,6 +68,8 @@ while [[ ${count} -lt 25 ]]; do
if [[ "${running}" == "3" ]]; then
log "Found 3 running tasks"
break
+ else
+ ${remote_exec} ./dcos marathon app list
fi
sleep ${count}
done
