diff options
Diffstat (limited to 'csit/scripts/healthcheck/test/pms_a1sim.sh')
-rwxr-xr-x | csit/scripts/healthcheck/test/pms_a1sim.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/csit/scripts/healthcheck/test/pms_a1sim.sh b/csit/scripts/healthcheck/test/pms_a1sim.sh index 8ba4ef44..d91821f4 100755 --- a/csit/scripts/healthcheck/test/pms_a1sim.sh +++ b/csit/scripts/healthcheck/test/pms_a1sim.sh @@ -30,35 +30,36 @@ chmod +x docker-compose ./docker-compose --env-file .env up -d checkStatus(){ - for i in {1..60}; do - res=$($1) + for ((i=0; i<$1; i++)); do + res=$($2) echo "$res" - expect=$2 + expect=$3 if [ "$res" == "$expect" ]; then - echo -e "$3 is alive!\n" + echo -e "$4 is alive!\n" break; else - sleep $i + sleep 1 fi done } + # Healthcheck docker containers # check SIM1 status echo "check SIM1 status:" -checkStatus "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1" +checkStatus 120 "curl -sSkw %{http_code} http://localhost:30001/ " "OK200" "SIM1" # check SIM2 status echo "check SIM2 status:" -checkStatus "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2" +checkStatus 120 "curl -sSkw %{http_code} http://localhost:30003/ " "OK200" "SIM2" # check SIM3 status echo "check SIM3 status:" -checkStatus "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3" +checkStatus 120 "curl -sSkw %{http_code} http://localhost:30005/ " "OK200" "SIM3" # check PMS status echo "check PMS status:" -checkStatus "curl -skw %{http_code} http://localhost:8081/status" "success200" "PMS" +checkStatus 120 "curl -sSkw %{http_code} http://localhost:8081/status " "success200" "PMS" cd ${SHELL_FOLDER}/../data ./preparePmsData.sh |