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