Fix no-tty tests
This commit is contained in:
parent
9ef581193c
commit
736d0cd86d
2
rosti.sh
2
rosti.sh
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ~/.bashrc
|
||||||
|
|
||||||
WIDTH=180
|
WIDTH=180
|
||||||
HEIGHT=25
|
HEIGHT=25
|
||||||
|
|
||||||
|
19
tests.sh
19
tests.sh
@ -20,8 +20,7 @@ function stop() {
|
|||||||
|
|
||||||
# Default page
|
# Default page
|
||||||
run
|
run
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "<title>Roští.cz</title>" > /dev/null
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000 | grep "<title>Roští.cz</title>" > /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT default response correct"
|
echo "$I/$COUNT default response correct"
|
||||||
else
|
else
|
||||||
@ -37,9 +36,9 @@ stop
|
|||||||
# Node.js 12.14.1
|
# Node.js 12.14.1
|
||||||
run
|
run
|
||||||
|
|
||||||
$DOCKER exec-t -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null
|
$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-12.14.1 $CONTAINER_NAME su app -c rosti > /dev/null
|
||||||
sleep 3
|
sleep 3
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Node.js 12.14.1 response correct"
|
echo "$I/$COUNT Node.js 12.14.1 response correct"
|
||||||
else
|
else
|
||||||
@ -54,9 +53,9 @@ stop
|
|||||||
# Node.js 13.7.0
|
# Node.js 13.7.0
|
||||||
run
|
run
|
||||||
|
|
||||||
$DOCKER exec-t -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null
|
$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=node-13.7.0 $CONTAINER_NAME su app -c rosti > /dev/null
|
||||||
sleep 3
|
sleep 3
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep package.json > /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Node.js 13.7.0 response correct"
|
echo "$I/$COUNT Node.js 13.7.0 response correct"
|
||||||
else
|
else
|
||||||
@ -72,9 +71,9 @@ stop
|
|||||||
# Python 3.8.2
|
# Python 3.8.2
|
||||||
run
|
run
|
||||||
|
|
||||||
$DOCKER exec-t -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null
|
$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=python-3.8.1 $CONTAINER_NAME su app -c rosti > /dev/null
|
||||||
sleep 5
|
sleep 5
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "app.py" > /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT Python 3.8.1 response correct"
|
echo "$I/$COUNT Python 3.8.1 response correct"
|
||||||
else
|
else
|
||||||
@ -89,9 +88,9 @@ stop
|
|||||||
# PHP 7.4.2
|
# PHP 7.4.2
|
||||||
run
|
run
|
||||||
|
|
||||||
$DOCKER exec-t -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null
|
$DOCKER exec -e TESTMODE=1 -e MENUITEM=tech -e TECH=php-7.4.2 $CONTAINER_NAME su app -c rosti > /dev/null
|
||||||
sleep 5
|
sleep 5
|
||||||
$DOCKER exec-t $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null
|
$DOCKER exec $CONTAINER_NAME curl http://localhost:8000 | grep "PHP aplikaci" > /dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$I/$COUNT PHP 7.4.2 response correct"
|
echo "$I/$COUNT PHP 7.4.2 response correct"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user