Use docker directly in NPM test runner

The checking of the container status should use docker directly.
This commit is contained in:
Markus Mäkelä 2018-08-08 12:00:41 +03:00
parent 6e481a0f95
commit 207a8609dc
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ services:
server1:
image: mariadb:10.2
network_mode: "host"
container_name: server1
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: Y
volumes:
@ -11,6 +12,7 @@ services:
server2:
image: mariadb:10.2
container_name: server2
network_mode: "host"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: Y
@ -20,6 +22,7 @@ services:
server3:
image: mariadb:10.2
container_name: server3
network_mode: "host"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: Y
@ -29,6 +32,7 @@ services:
server4:
image: mariadb:10.2
container_name: server4
network_mode: "host"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: Y

View File

@ -80,7 +80,7 @@ do
printf "Waiting for $node to start... "
for ((i=0; i<60; i++))
do
docker-compose exec $node mysql -umaxuser -pmaxpwd -e "select 1" >& /dev/null && break
docker exec -ti $node mysql -umaxuser -pmaxpwd -e "select 1" >& /dev/null && break
sleep 1
done
echo "Done!"