summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-05 11:00:38 +0100
committerGitHub <noreply@github.com>2019-03-05 11:00:38 +0100
commit1a921420519d56cca9871d09201b717c030ea171 (patch)
treeb6ddab6bedf684dc970437018045d00a8c7d4ddb
parent679afa251ba8fb21b9379079ed078ac804358f48 (diff)
parentc32c91d1da11444619f545e18c2c39732326c8a8 (diff)
downloadnextcloud-server-1a921420519d56cca9871d09201b717c030ea171.tar.gz
nextcloud-server-1a921420519d56cca9871d09201b717c030ea171.zip
Merge pull request #14528 from nextcloud/bugfix/noid/fix-database-configuration
Fix database configuration
-rwxr-xr-xautotest.sh51
1 files changed, 26 insertions, 25 deletions
diff --git a/autotest.sh b/autotest.sh
index f0ceca62b40..ca0f16c7d8e 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -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
@@ -229,9 +229,9 @@ function execute_tests {
-e MYSQL_USER="$DATABASEUSER" \
-e MYSQL_PASSWORD=owncloud \
-e MYSQL_DATABASE="$DATABASENAME" \
- -d mysql:5.7
- --innodb_large_prefix=true
- --innodb_file_format=barracuda
+ -d mysql:5.7 \
+ --innodb_large_prefix=true \
+ --innodb_file_format=barracuda \
--innodb_file_per_table=true)
DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
@@ -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: