From 76aed5864120e04ac470414ee6e3bc5928648601 Mon Sep 17 00:00:00 2001 From: Alexander Indenbaum Date: Tue, 22 Oct 2024 10:11:49 +0000 Subject: [PATCH] tweak wait for gateways ha test Signed-off-by: Alexander Indenbaum --- tests/ha/wait_gateways.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ha/wait_gateways.sh b/tests/ha/wait_gateways.sh index d956b334..6edc2f6c 100755 --- a/tests/ha/wait_gateways.sh +++ b/tests/ha/wait_gateways.sh @@ -1,3 +1,5 @@ +#!/bin/sh +set -ex SCALE=2 echo CLI_TLS_ARGS $CLI_TLS_ARGS # Check if argument is provided @@ -16,7 +18,7 @@ for i in $(seq $SCALE); do sleep 1 # Adjust the sleep duration as needed GW_NAME=$(docker ps --format '{{.ID}}\t{{.Names}}' | awk '$2 ~ /nvmeof/ && $2 ~ /'$i'/ {print $1}') container_status=$(docker inspect -f '{{.State.Status}}' "$GW_NAME") - if [ "$container_status" == "running" ]; then + if [ "$container_status" = "running" ]; then echo "Container $i $GW_NAME is now running." else echo "Container $i $GW_NAME is still not running. Waiting..."