Remove hardcoded http in URL in sahara exercise script

The script hardcoded http://$SERVICE_HOST/... which failed
when SSL or tls-proxy was enabled. Calculate the protocol
based on enabled services instead.

Change-Id: I192eeeafe7bf4dc5cbd382c505ffb9307651d78a
This commit is contained in:
Rob Crittenden 2015-06-04 18:01:29 -04:00
parent 21b7e975fa
commit ce2d75df01

View File

@ -35,7 +35,13 @@ source $TOP_DIR/exerciserc
is_service_enabled sahara || exit 55 is_service_enabled sahara || exit 55
$CURL_GET http://$SERVICE_HOST:8386/ 2>/dev/null | grep -q 'Auth' || die $LINENO "Sahara API isn't functioning!" if is_ssl_enabled_service "sahara" || is_service_enabled tls-proxy; then
SAHARA_SERVICE_PROTOCOL="https"
fi
SAHARA_SERVICE_PROTOCOL=${SAHARA_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
$CURL_GET $SAHARA_SERVICE_PROTOCOL://$SERVICE_HOST:8386/ 2>/dev/null | grep -q 'Auth' || die $LINENO "Sahara API isn't functioning!"
set +o xtrace set +o xtrace
echo "*********************************************************************" echo "*********************************************************************"