summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-04-30 20:01:21 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-05-01 13:00:49 +0200
commit752718e833b3b08d47a0f38f475fad38b24b1827 (patch)
treed996720dbe3df2055c229a51bc3fd54feac77e6b /autotest.sh
parent5e8cedab9f7dddd06b6973a9bf355536fa2e063f (diff)
downloadnextcloud-server-752718e833b3b08d47a0f38f475fad38b24b1827.tar.gz
nextcloud-server-752718e833b3b08d47a0f38f475fad38b24b1827.zip
Add mariadb 10.0 ci tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/autotest.sh b/autotest.sh
index ca0f16c7d8e..db24517e085 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -283,12 +283,22 @@ function execute_tests {
echo "MariaDB is up."
else
- if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ] ; then
- echo "Your mysql binary is not provided by MariaDB"
- echo "To use the docker container set the USEDOCKER environment variable"
- exit -1
+ if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
+ if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ] ; then
+ echo "Your mysql binary is not provided by MariaDB"
+ echo "To use the docker container set the USEDOCKER environment variable"
+ exit -1
+ fi
+ mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
+ else
+ DATABASEHOST=mariadb
fi
- mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
+ fi
+
+ echo "Waiting for MariaDB initialisation ..."
+ if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 600; then
+ echo "[ERROR] Waited 600 seconds, no response" >&2
+ exit 1
fi
#Reset _DB to mysql since that is what we use internally