Update test.sh for ui-tests an the compose file

This commit is contained in:
Théophile Diot 2023-05-05 09:46:52 -04:00
parent 75d2be7db7
commit 21dc67b68d
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
2 changed files with 15 additions and 6 deletions

View File

@ -78,6 +78,17 @@ services:
bw-services:
ipv4_address: 192.168.0.4
ui-tests:
build: .
environment:
- PYTHONUNBUFFERED=1
extra_hosts:
- "www.example.com:192.168.0.2"
- "app1.example.com:192.168.0.2"
networks:
bw-services:
ipv4_address: 192.168.0.3
volumes:
bw-data:

View File

@ -19,6 +19,9 @@ if [ $? -ne 0 ] ; then
echo "❌ Up failed"
exit 1
fi
docker-compose stop ui-tests
i=0
while [ $i -lt 120 ] ; do
containers=("ui_bw_1" "ui_bw-scheduler_1" "ui_bw-ui_1")
@ -44,12 +47,7 @@ if [ $i -ge 120 ] ; then
fi
# Start tests
docker-compose -f docker-compose.tests.yml build
if [ $? -ne 0 ] ; then
echo "❌ Build failed"
exit 1
fi
docker-compose -f docker-compose.tests.yml up --abort-on-container-exit --exit-code-from ui-tests
docker-compose start ui-tests
# Exit
exit $?