]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix whitespaces 14533/head
authorJoas Schilling <coding@schilljs.com>
Tue, 5 Mar 2019 08:31:45 +0000 (09:31 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 5 Mar 2019 10:02:13 +0000 (10:02 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
autotest.sh

index f7020ec3c133605e75f4e882678dafb898aba319..5825c2579f2bd7285eb7e57cfcf509fdf4b5653e 100755 (executable)
@@ -204,21 +204,21 @@ function execute_tests {
 
                else
                        if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
-                if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
-                    echo "Your mysql binary is not provided by mysql"
-                    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=mysql
-            fi
+                               if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
+                                       echo "Your mysql binary is not provided by mysql"
+                                       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=mysql
+                       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
-        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" == "mysqlmb4" ] ; then
                if [ ! -z "$USEDOCKER" ] ; then
@@ -331,13 +331,13 @@ function execute_tests {
                echo "Waiting for Oracle initialization ... "
 
                # Try to connect to the OCI host via sqlplus to ensure that the connection is already running
-               for i in {1..48}
-                do
-                        if sqlplus "autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=$DATABASEHOST)(Port=1521))(CONNECT_DATA=(SID=XE)))" < /dev/null | grep 'Connected to'; then
-                                break;
-                        fi
-                        sleep 5
-                done
+               for i in {1..48}
+               do
+                       if sqlplus "autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=$DATABASEHOST)(Port=1521))(CONNECT_DATA=(SID=XE)))" < /dev/null | grep 'Connected to'; then
+                               break;
+                       fi
+                       sleep 5
+               done
 
                DATABASEUSER=autotest
                DATABASENAME='XE'
@@ -432,7 +432,8 @@ fi
 # NOTES on pgsql:
 #  - su - postgres
 #  - createuser -P oc_autotest (enter password and enable superuser)
-#  - to enable dropdb I decided to add following line to pg_hba.conf (this is not the safest way but I don't care for the testing machine):
+#  - to enable dropdb I decided to add following line to pg_hba.conf
+#    (this is not the safest way but I don't care for the testing machine):
 # local        all     all     trust
 #
 #  - for parallel executor support with EXECUTOR_NUMBER=0: