From 5a2a6f9d32a54ba3d98adf80c026c523b5902d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 3 Feb 2020 00:28:14 +0100 Subject: [PATCH] Debug --- tests.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests.sh b/tests.sh index 378ac84..1d5d8ed 100755 --- a/tests.sh +++ b/tests.sh @@ -20,7 +20,8 @@ function stop() { # Default page run -$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "Roští.cz" > /dev/null +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "Roští.cz" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT default response correct" else @@ -36,9 +37,9 @@ stop # Node.js 12.14.1 run -$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null sleep 3 -$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Node.js 12.14.1 response correct" else @@ -53,9 +54,9 @@ stop # Node.js 13.7.0 run -$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null sleep 3 -$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Node.js 13.7.0 response correct" else @@ -71,9 +72,9 @@ stop # Python 3.8.2 run -$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null sleep 5 -$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT Python 3.8.1 response correct" else @@ -88,9 +89,9 @@ stop # PHP 7.4.2 run -$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null +$DOCKER exec -ti -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null sleep 5 -$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null +$DOCKER exec -ti $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null if [ $? -eq 0 ]; then echo "$I/$COUNT PHP 7.4.2 response correct" else