Files
huly-platform/foundations/server/tests/wait-elastic.sh
T
Denis Bykhov 2b0d510202 Add 'foundations/server/' from commit 'afe85b988c56330dd14d44fb766e2c41871b64a7'
git-subtree-dir: foundations/server
git-subtree-mainline: fd0b7130eb
git-subtree-split: afe85b988c
2025-11-26 22:56:52 +05:00

17 lines
379 B
Bash
Executable File

res=''
port=$1
echo "Warning Elastic to up and running with attachment processor... ${port}"
for i in `seq 1 30`;
do
res=$(curl -s http://localhost:${port}/_cluster/health )
echo "$res"
if [[ $res = *"yellow"* ]]; then
echo "Elastic up and running..."
exit 0
fi
if [[ $res = *"green"* ]]; then
echo "Elastic up and running..."
exit 0
fi
sleep 1
done