This commit is contained in:
parent
6ae863148f
commit
ff0bca9421
2 changed files with 14 additions and 2 deletions
|
@ -18,9 +18,9 @@ def index(hours=None, minutes=None):
|
||||||
if not hours:
|
if not hours:
|
||||||
hours = 17
|
hours = 17
|
||||||
if hours and not minutes:
|
if hours and not minutes:
|
||||||
minutes = 30
|
|
||||||
else:
|
|
||||||
minutes = 0
|
minutes = 0
|
||||||
|
else:
|
||||||
|
minutes = 30
|
||||||
|
|
||||||
data = render_template('beer.html', hours=hours, minutes=minutes)
|
data = render_template('beer.html', hours=hours, minutes=minutes)
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -5,6 +5,18 @@ else
|
||||||
fi
|
fi
|
||||||
echo "testing URL: ${TEST_URL}"
|
echo "testing URL: ${TEST_URL}"
|
||||||
|
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
status_code=$(curl -o /dev/null -s -w '%{http_code}' ${TEST_URL})
|
||||||
|
echo "status code: ${status_code}"
|
||||||
|
[[ ${status_code} -eq 200 ]] && break
|
||||||
|
[[ ${i} -gt 5 ]] && exit 1
|
||||||
|
echo "service not ready or in error"
|
||||||
|
sleep 5
|
||||||
|
i=$(( i+1 ))
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
CURL_OPTS='-s'
|
CURL_OPTS='-s'
|
||||||
# default
|
# default
|
||||||
curl ${CURL_OPTS} ${TEST_URL} | grep -q 'setHours( 17, 30);'
|
curl ${CURL_OPTS} ${TEST_URL} | grep -q 'setHours( 17, 30);'
|
||||||
|
|
Loading…
Reference in a new issue