summaryrefslogtreecommitdiff
path: root/tests/docker/entrypoint.sh
diff options
context:
space:
mode:
authorJLGC @monolinux <monolinux@junglacode.org>2016-08-15 23:13:16 -0500
committerJLGC @monolinux <monolinux@junglacode.org>2016-08-15 23:13:16 -0500
commit683c0464093f6a7976236c68653c2a2cc5dae280 (patch)
treebf176ecd82415cc4952eea071b7d264dd5fd68b4 /tests/docker/entrypoint.sh
parentb1e795fc5b45369f7b9b565b1e106d2673361977 (diff)
parent5f82a942c0011bf91947b2c1d627c0907bda0c92 (diff)
Merge https://github.com/kanboard/kanboard
Diffstat (limited to 'tests/docker/entrypoint.sh')
-rwxr-xr-xtests/docker/entrypoint.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/docker/entrypoint.sh b/tests/docker/entrypoint.sh
new file mode 100755
index 00000000..5a37ae4e
--- /dev/null
+++ b/tests/docker/entrypoint.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+function wait_schema_creation() {
+ curl -s http://app/login > /dev/null
+ sleep $1
+}
+
+case "$1" in
+"config-sqlite")
+ cp /configs/config.sqlite.php /var/www/html/config.php
+ /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
+ ;;
+"config-postgres")
+ cp /configs/config.postgres.php /var/www/html/config.php
+ /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
+ ;;
+"config-mysql")
+ cp /configs/config.mysql.php /var/www/html/config.php
+ /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
+ ;;
+"integration-test-sqlite")
+ wait_schema_creation 1
+ /var/www/html/vendor/phpunit/phpunit/phpunit -c /var/www/html/tests/integration.sqlite.xml
+ ;;
+"integration-test-postgres")
+ wait_schema_creation 10
+ /var/www/html/vendor/phpunit/phpunit/phpunit -c /var/www/html/tests/integration.postgres.xml
+ ;;
+"integration-test-mysql")
+ wait_schema_creation 15
+ /var/www/html/vendor/phpunit/phpunit/phpunit -c /var/www/html/tests/integration.mysql.xml
+ ;;
+esac