From 7743ee8f8fa48026d6b3cbb0ed1d4f5d2c5d9add Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20de=20Talhou=C3=ABt?= Date: Thu, 9 Mar 2017 16:40:39 -0500 Subject: [PATCH] Fix docker_health.sh third check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit if [[ ${res} != 0 ]] checks wether the value is "0" but the value return by the command is " 0" hence the validation fails. Changing the if to compare string instead of integer. Change-Id: Ibb671dcc9c4cd870b931e9e06a185aa4bea5dc5f Signed-off-by: Alexis de Talhouët --- sdc-os-chef/scripts/docker_health.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdc-os-chef/scripts/docker_health.sh b/sdc-os-chef/scripts/docker_health.sh index 832b25a237..1db5282446 100644 --- a/sdc-os-chef/scripts/docker_health.sh +++ b/sdc-os-chef/scripts/docker_health.sh @@ -14,7 +14,7 @@ curl http://localhost:8181/sdc1/rest/healthCheck echo "" echo "" res=`curl -s -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" "http://localhost:8080/sdc2/rest/v1/user/demo" | wc -l` -if [[ ${res} != 0 ]] +if [[ ! ${res} -eq 0 ]] then echo "Error [${res}] while user existance check" exit ${res} -- 2.16.6