Merge "Adding more msgs, checking admin/non-admin endpoints"

This commit is contained in:
Jenkins 2014-03-06 17:53:08 +00:00 committed by Gerrit Code Review
commit 3f78430cb4

View File

@ -15,11 +15,20 @@
# How many seconds to wait for the API to be responding before giving up
API_RESPONDING_TIMEOUT=20
if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s -o /dev/null http://127.0.0.1:9311/ ; do sleep 1; done"; then
echo "API failed to respond within ${API_RESPONDING_TIMEOUT} seconds"
if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s http://127.0.0.1:9311/ 2>/dev/null | grep -q 'Authentication required' ; do sleep 1; done"; then
echo "The Barbican (non-admin) API failed to respond within ${API_RESPONDING_TIMEOUT} seconds"
exit 1
fi
echo "Successfully contacted the Barbican (non-admin) API"
if ! timeout ${API_RESPONDING_TIMEOUT} sh -c "while ! curl -s http://127.0.0.1:9312/ 2>/dev/null | grep -q 'v1' ; do sleep 1; done"; then
echo "The Barbican (admin) API failed to respond within ${API_RESPONDING_TIMEOUT} seconds"
exit 1
fi
echo "Successfully contacted the Barbican (admin) API"
# Where tempest code lives
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}