Add: Timeout variable on test

This commit is contained in:
Siroco 2023-02-04 15:48:11 +01:00
parent b9cfee1fc6
commit 317e65811a
No known key found for this signature in database
GPG Key ID: 1324098302A514B0

3
test
View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
TMP=/tmp/wordpress TMP=/tmp/wordpress
TIMEOUT=120
tear_down () { tear_down () {
docker-compose stop docker-compose stop
@ -24,7 +25,7 @@ echo -n "Espera al servidor web "
while ! curl -s localhost:12001 > /dev/null; do while ! curl -s localhost:12001 > /dev/null; do
echo -n "." echo -n "."
cont=$((cont+1)) cont=$((cont+1))
if [ "$cont" == 30 ]; then if [ "$cont" == $TIMEOUT ]; then
echo " no responde" echo " no responde"
tear_down tear_down
exit 1 exit 1