Skip to content

Commit

Permalink
Wait for Plesk initialization before tests execution
Browse files Browse the repository at this point in the history
  • Loading branch information
sibprogrammer committed Jun 29, 2019
1 parent a17666a commit c358e6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
environment:
REMOTE_URL: https://plesk:8443
REMOTE_PASSWORD: changeme
command: bash -c "cd /opt/api-php-lib && composer install && composer test -- --testdox"
command: bash -c "cd /opt/api-php-lib && composer install && ./wait-for-plesk.sh && composer test -- --testdox"
depends_on:
- plesk
links:
Expand Down
7 changes: 7 additions & 0 deletions wait-for-plesk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

while : ; do
curl -ks https://plesk:8443/ | grep "<title>Plesk" > /dev/null
[ $? -eq 0 ] && break
sleep 5
done

0 comments on commit c358e6a

Please sign in to comment.