]> source.dussan.org Git - nextcloud-server.git/commitdiff
add actual check if mysql is up already 1397/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 13 Sep 2016 18:42:31 +0000 (20:42 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 13 Sep 2016 18:47:17 +0000 (20:47 +0200)
autotest.sh

index 5f5633fcf0f4fdd7d54aa04704132ed8233c02ab..3f62657a90da7943cebd5337119aeca477b3ceee 100755 (executable)
@@ -191,14 +191,6 @@ function execute_tests {
                                -d mysql)
                        DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
 
-                       echo "Waiting for MySQL 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
-
-                       echo "MySQL is up."
-
                else
                        if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
                 if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
@@ -211,6 +203,11 @@ function execute_tests {
                 DATABASEHOST=127.0.0.1
             fi
                fi
+        echo "Waiting for MySQL 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
        fi
        if [ "$DB" == "mariadb" ] ; then
                if [ ! -z "$USEDOCKER" ] ; then