diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 17:38:12 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-10-19 00:15:01 +0200 |
commit | 9c3f066dabe57af6f5fedb1579f724c58adb8f94 (patch) | |
tree | 31056ef725537f4fa0e63e8407726d854ad40f88 /autotest.sh | |
parent | a7245ea08284568f9a449a11b726048dcec06d4a (diff) | |
download | nextcloud-server-9c3f066dabe57af6f5fedb1579f724c58adb8f94.tar.gz nextcloud-server-9c3f066dabe57af6f5fedb1579f724c58adb8f94.zip |
Adding docker based unit test execution for mysql utf8mb4
Diffstat (limited to 'autotest.sh')
-rwxr-xr-x | autotest.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/autotest.sh b/autotest.sh index eca3d81c048..8674fb74c30 100755 --- a/autotest.sh +++ b/autotest.sh @@ -21,7 +21,7 @@ ADMINLOGIN=admin$EXECUTOR_NUMBER BASEDIR=$PWD PRIMARY_STORAGE_CONFIGS="local swift" -DBCONFIGS="sqlite mysql mariadb pgsql oci" +DBCONFIGS="sqlite mysql mariadb pgsql oci mysqlmb4" # $PHP_EXE is run through 'which' and as such e.g. 'php' or 'hhvm' is usually # sufficient. Due to the behaviour of 'which', $PHP_EXE may also be a path @@ -209,6 +209,31 @@ function execute_tests { exit 1 fi fi + if [ "$DB" == "mysqlmb4" ] ; then + echo "Fire up the mysql docker" + DOCKER_CONTAINER_ID=$(docker run \ + -v tests/docker/mysqlmb4:/etc/mysql/conf.d \ + -e MYSQL_ROOT_PASSWORD=owncloud \ + -e MYSQL_USER="$DATABASEUSER" \ + -e MYSQL_PASSWORD=owncloud \ + -e MYSQL_DATABASE="$DATABASENAME" \ + -d mysql:5.7) + + DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") + + echo "Waiting for MySQL(utf8mb4) initialisation ..." + + if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 + fi + sleep 1 + + echo "MySQL(utf8mb4) is up." + _DB="mysql" + + cp tests/docker/mysqlmb4.config.php config + fi if [ "$DB" == "mariadb" ] ; then if [ ! -z "$USEDOCKER" ] ; then echo "Fire up the mariadb docker" |