From 545226eb6bacde947dcfb0a65faa2df1beed85ea Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 23 May 2023 02:34:02 +0200 Subject: [PATCH] fix cs tests --- .tests/crowdsec.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.tests/crowdsec.sh b/.tests/crowdsec.sh index a8e4819..0381f58 100755 --- a/.tests/crowdsec.sh +++ b/.tests/crowdsec.sh @@ -32,13 +32,10 @@ echo "ℹ️ Waiting for BW ..." success="ko" retry=0 while [ $retry -lt 60 ] ; do - ret="$(curl -s -o /dev/null -w "%{http_code}" -H "Host: www.example.com" http://localhost)" - if [ $? -eq 0 ] && [ $ret -eq 200 ] ; then - ret="$(curl -s -H "Host: www.example.com" http://localhost | grep -i "hello")" - if [ "$ret" != "" ] ; then - success="ok" - break - fi + ret="$(curl -s -H "Host: www.example.com" http://localhost | grep -i "hello")" + if [ $? -eq 0 ] && [ "$ret" != "" ] ; then + success="ok" + break fi retry=$(($retry + 1)) sleep 1 @@ -83,4 +80,4 @@ if [ "$1" = "verbose" ] ; then fi docker-compose down -v -echo "ℹ️ CrowdSec tests done" \ No newline at end of file +echo "ℹ️ CrowdSec tests done"