From 6c2bfae36dfa0bde96fa96092ccad8b32beb7f02 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Fri, 22 Jul 2016 19:21:42 +0900 Subject: 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 --- tests/run.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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 -- cgit 1.2.3-korg