diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2016-07-22 19:21:42 +0900 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2016-07-22 19:23:32 +0900 |
commit | 6c2bfae36dfa0bde96fa96092ccad8b32beb7f02 (patch) | |
tree | 5d62f039db545466ac27ffbdee641e1b44c18fb4 | |
parent | 5aa254607e0737916dc72200064857882e1abd36 (diff) |
make script fail if it failed to get COMPUTE_HOST
This patch is to make sure the test will be stop and report it failed.
JIRA: DOCTOR-63
Change-Id: Ibab577a100dee784df14e8b129fbde626d04fce9
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
-rwxr-xr-x | tests/run.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run.sh b/tests/run.sh index 4d9a5c73..5dbd608b 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -46,6 +46,10 @@ get_compute_host_info() { grep "OS-EXT-SRV-ATTR:host" | awk '{ print $4 }' | awk -F '.' '{print $1}') ) + if [[ -z "$COMPUTE_HOST" ]] ; then + echo "ERROR: failed to get compute hostname" + exit 1 + fi if [[ "$INSTALLER_TYPE" == "apex" ]] ; then COMPUTE_USER=${COMPUTE_USER:-heat-admin} if [[ "$INSTALLER_IP" == "none" ]] ; then |