murano/functionaltests/run_tests_common.sh
Victor Ryzhenkin 66f310b227 Change Murano API detection in tests and fix tests itself
- Use 401 error to determine work of Murano API in shell via curl
- Change tempest parameters in utils
- Rename mistralclient.py to workflowclient.py due names conflict in
path.

Closes-Bug: #1614602

Change-Id: I91bdda91da929b183393c4210af86bce619a53ec
2016-08-22 19:02:09 +00:00

17 lines
520 B
Bash
Executable File

#!/bin/bash
# Intended be sourced by other scripts
# 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 http://127.0.0.1:8082/v1/ 2>/dev/null | grep -q 'Unauthorized' ; do sleep 1; done"; then
echo "Murano API failed to respond within ${API_RESPONDING_TIMEOUT} seconds"
exit 1
fi
echo "Successfully contacted Murano API"
# Where tempest code lives
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}