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
b30da61d
Commit
b30da61d
authored
12 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
postgres added to autotest mechanism
parent
20a174e7
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
-5
26 additions, 5 deletions
autotest.sh
with
26 additions
and
5 deletions
autotest.sh
+
26
−
5
View file @
b30da61d
...
...
@@ -38,12 +38,26 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
);
DELIM
cat
>
./tests/autoconfig-pgsql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
'adminlogin' => 'admin',
'adminpass' => 'admin',
'directory' => '
$BASEDIR
/
$DATADIR
',
'dbuser' => 'oc_autotest',
'dbname' => 'oc_autotest',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
function
execute_tests
{
echo
"Setup environment for
$1
testing ..."
# back to root folder
cd
$BASEDIR
echo
$BASEDIR
# revert changes to tests/data
git checkout tests/data/
*
...
...
@@ -59,6 +73,9 @@ function execute_tests {
if
[
"
$1
"
==
"mysql"
]
;
then
mysql
-u
oc_autotest
-powncloud
-e
"DROP DATABASE oc_autotest"
fi
if
[
"
$1
"
==
"pgsql"
]
;
then
dropdb
-U
oc_autotest oc_autotest
fi
# copy autoconfig
cp
$BASEDIR
/tests/autoconfig-
$1
.php
$BASEDIR
/config/autoconfig.php
...
...
@@ -77,13 +94,17 @@ function execute_tests {
#
execute_tests
"sqlite"
execute_tests
'mysql'
# TODO: implement this
#execute_tests 'postgresql'
execute_tests
'pgsql'
#
# NOTES:
# NOTES
on mysql
:
# - CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud';
# - grant access permissions: grant all on oc_autotest.* to 'oc_autotest'@'localhost';
#
# NOTES on pgsql:
# - su - postgres
# - createuser -P (enter username and 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):
# local all all trust
#
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