Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
4e625202
Commit
4e625202
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Use EXECUTOR_NUMBER in database name and user name.
parent
1a2db491
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
autotest.sh
+23
-18
23 additions, 18 deletions
autotest.sh
with
23 additions
and
18 deletions
autotest.sh
+
23
−
18
View file @
4e625202
...
...
@@ -3,12 +3,17 @@
# ownCloud
#
# @author Thomas Müller
# @copyright 2012 Thomas Müller thomas.mueller@tmit.eu
# @copyright 2012
, 2013
Thomas Müller thomas.mueller@tmit.eu
#
#$EXECUTOR_NUMBER is set by Jenkins and allows us to run autotest in parallel
DATABASENAME
=
oc_autotest
$EXECUTOR_NUMBER
ADMINLOGIN
=
admin
$EXECUTOR_NUMBER
DATADIR
=
data-autotest
BASEDIR
=
$PWD
echo
"Using database
$DATABASENAME
"
# create autoconfig for sqlite, mysql and postgresql
cat
>
./tests/autoconfig-sqlite.php
<<
DELIM
<?php
...
...
@@ -16,7 +21,7 @@ cat > ./tests/autoconfig-sqlite.php <<DELIM
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
'adminlogin' =>
'admin'
,
'adminlogin' =>
$ADMINLOGIN
,
'adminpass' => 'admin',
'directory' => '
$BASEDIR
/
$DATADIR
',
);
...
...
@@ -28,11 +33,11 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
'adminlogin' =>
'admin'
,
'adminlogin' =>
$ADMINLOGIN
,
'adminpass' => 'admin',
'directory' => '
$BASEDIR
/
$DATADIR
',
'dbuser' => 'oc_autotest',
'dbname' =>
'oc_autotest',
'dbname' =>
$DATABASENAME
,
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
...
...
@@ -44,11 +49,11 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
'adminlogin' =>
'admin'
,
'adminlogin' =>
$ADMINLOGIN
,
'adminpass' => 'admin',
'directory' => '
$BASEDIR
/
$DATADIR
',
'dbuser' => 'oc_autotest',
'dbname' =>
'oc_autotest',
'dbname' =>
$DATABASENAME
,
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
...
...
@@ -60,10 +65,10 @@ cat > ./tests/autoconfig-oci.php <<DELIM
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',
'adminlogin' =>
'admin'
,
'adminlogin' =>
$ADMINLOGIN
,
'adminpass' => 'admin',
'directory' => '
$BASEDIR
/
$DATADIR
',
'dbuser' =>
'oc_autotest'
,
'dbuser' =>
$DATABASENAME
,
'dbname' => 'XE',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
...
...
@@ -88,21 +93,21 @@ function execute_tests {
# drop database
if
[
"
$1
"
==
"mysql"
]
;
then
mysql
-u
oc_autotest
-powncloud
-e
"DROP DATABASE
oc_autotest
"
mysql
-u
oc_autotest
-powncloud
-e
"DROP DATABASE
$DATABASENAME
"
fi
if
[
"
$1
"
==
"pgsql"
]
;
then
dropdb
-U
oc_autotest
oc_autotest
dropdb
-U
oc_autotest
$DATABASENAME
fi
if
[
"
$1
"
==
"oci"
]
;
then
echo
"drop the database"
sqlplus
-s
-l
/ as sysdba
<<
EOF
drop user
oc_autotest
cascade;
drop user
$DATABASENAME
cascade;
EOF
echo
"create the database"
sqlplus
-s
-l
/ as sysdba
<<
EOF
create user
oc_autotest
identified by owncloud;
alter user
oc_autotest
default tablespace users
create user
$DATABASENAME
identified by owncloud;
alter user
$DATABASENAME
default tablespace users
temporary tablespace temp
quota unlimited on users;
grant create session
...
...
@@ -113,7 +118,7 @@ EOF
, create view
, create synonym
, alter session
to
oc_autotest
;
to
$DATABASENAME
;
exit;
EOF
fi
...
...
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