Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
1a921420
Unverified
Commit
1a921420
authored
6 years ago
by
Morris Jobke
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14528 from nextcloud/bugfix/noid/fix-database-configuration
Fix database configuration
parents
679afa25
c32c91d1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autotest.sh
+26
-25
26 additions, 25 deletions
autotest.sh
with
26 additions
and
25 deletions
autotest.sh
+
26
−
25
View file @
1a921420
...
@@ -204,21 +204,21 @@ function execute_tests {
...
@@ -204,21 +204,21 @@ function execute_tests {
else
else
if
[
-z
"
$DRONE
"
]
;
then
# no need to drop the DB when we are on CI
if
[
-z
"
$DRONE
"
]
;
then
# no need to drop the DB when we are on CI
if
[
"mysql"
!=
"
$(
mysql
--version
|
grep
-o
mysql
)
"
]
;
then
if
[
"mysql"
!=
"
$(
mysql
--version
|
grep
-o
mysql
)
"
]
;
then
echo
"Your mysql binary is not provided by mysql"
echo
"Your mysql binary is not provided by mysql"
echo
"To use the docker container set the USEDOCKER environment variable"
echo
"To use the docker container set the USEDOCKER environment variable"
exit
-1
exit
-1
fi
fi
mysql
-u
"
$DATABASEUSER
"
-powncloud
-e
"DROP DATABASE IF EXISTS
$DATABASENAME
"
-h
$DATABASEHOST
||
true
mysql
-u
"
$DATABASEUSER
"
-powncloud
-e
"DROP DATABASE IF EXISTS
$DATABASENAME
"
-h
$DATABASEHOST
||
true
else
else
DATABASEHOST
=
mysql
DATABASEHOST
=
mysql
fi
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
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
fi
if
[
"
$DB
"
==
"mysqlmb4"
]
;
then
if
[
"
$DB
"
==
"mysqlmb4"
]
;
then
if
[
!
-z
"
$USEDOCKER
"
]
;
then
if
[
!
-z
"
$USEDOCKER
"
]
;
then
...
@@ -229,9 +229,9 @@ function execute_tests {
...
@@ -229,9 +229,9 @@ function execute_tests {
-e
MYSQL_USER
=
"
$DATABASEUSER
"
\
-e
MYSQL_USER
=
"
$DATABASEUSER
"
\
-e
MYSQL_PASSWORD
=
owncloud
\
-e
MYSQL_PASSWORD
=
owncloud
\
-e
MYSQL_DATABASE
=
"
$DATABASENAME
"
\
-e
MYSQL_DATABASE
=
"
$DATABASENAME
"
\
-d
mysql:5.7
-d
mysql:5.7
\
--innodb_large_prefix
=
true
--innodb_large_prefix
=
true
\
--innodb_file_format
=
barracuda
--innodb_file_format
=
barracuda
\
--innodb_file_per_table
=
true
)
--innodb_file_per_table
=
true
)
DATABASEHOST
=
$(
docker inspect
--format
=
"{{.NetworkSettings.IPAddress}}"
"
$DOCKER_CONTAINER_ID
"
)
DATABASEHOST
=
$(
docker inspect
--format
=
"{{.NetworkSettings.IPAddress}}"
"
$DOCKER_CONTAINER_ID
"
)
...
@@ -331,13 +331,13 @@ function execute_tests {
...
@@ -331,13 +331,13 @@ function execute_tests {
echo
"Waiting for Oracle initialization ... "
echo
"Waiting for Oracle initialization ... "
# Try to connect to the OCI host via sqlplus to ensure that the connection is already running
# Try to connect to the OCI host via sqlplus to ensure that the connection is already running
for
i
in
{
1..48
}
for
i
in
{
1..48
}
do
do
if
sqlplus
"autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=
$DATABASEHOST
)(Port=1521))(CONNECT_DATA=(SID=XE)))"
< /dev/null |
grep
'Connected to'
;
then
if
sqlplus
"autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=
$DATABASEHOST
)(Port=1521))(CONNECT_DATA=(SID=XE)))"
< /dev/null |
grep
'Connected to'
;
then
break
;
break
;
fi
fi
sleep
5
sleep
5
done
done
DATABASEUSER
=
autotest
DATABASEUSER
=
autotest
DATABASENAME
=
'XE'
DATABASENAME
=
'XE'
...
@@ -432,7 +432,8 @@ fi
...
@@ -432,7 +432,8 @@ fi
# NOTES on pgsql:
# NOTES on pgsql:
# - su - postgres
# - su - postgres
# - createuser -P oc_autotest (enter password and enable superuser)
# - 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
# local all all trust
#
#
# - for parallel executor support with EXECUTOR_NUMBER=0:
# - for parallel executor support with EXECUTOR_NUMBER=0:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment