Skip to content

Commit

Permalink
fix cs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0ppy-d1sk committed May 23, 2023
1 parent ce0c385 commit 545226e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .tests/crowdsec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -83,4 +80,4 @@ if [ "$1" = "verbose" ] ; then
fi
docker-compose down -v

echo "ℹ️ CrowdSec tests done"
echo "ℹ️ CrowdSec tests done"

0 comments on commit 545226e

Please sign in to comment.