Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
moodle_rebase10.1.2
Commits
0dd7a379
Commit
0dd7a379
authored
Feb 08, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test-database, test-user optional.
parent
13859ffe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
slapos/recipe/generic_mysql/__init__.py
slapos/recipe/generic_mysql/__init__.py
+11
-9
No files found.
slapos/recipe/generic_mysql/__init__.py
View file @
0dd7a379
...
...
@@ -31,7 +31,8 @@ class Recipe(GenericBaseRecipe):
def
_options
(
self
,
options
):
options
[
'password'
]
=
self
.
generatePassword
()
options
[
'test-password'
]
=
self
.
generatePassword
()
if
'test-database'
in
options
:
options
[
'test-password'
]
=
self
.
generatePassword
()
options
.
setdefault
(
'parallel-test-database-amount'
,
'0'
)
for
x
in
xrange
(
0
,
int
(
options
[
'parallel-test-database-amount'
])):
options
[
'test-password-%s'
%
x
]
=
self
.
generatePassword
()
...
...
@@ -77,14 +78,15 @@ class Recipe(GenericBaseRecipe):
}
))
# default test database
mysql_script_list
.
append
(
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'initmysql.sql.in'
),
{
'mysql_database'
:
self
.
options
[
'test-database'
],
'mysql_user'
:
self
.
options
[
'test-user'
],
'mysql_password'
:
self
.
options
[
'test-password'
]
}
))
if
'test-database'
in
self
.
options
:
mysql_script_list
.
append
(
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'initmysql.sql.in'
),
{
'mysql_database'
:
self
.
options
[
'test-database'
],
'mysql_user'
:
self
.
options
[
'test-user'
],
'mysql_password'
:
self
.
options
[
'test-password'
]
}
))
# parallel test databases
for
x
in
xrange
(
0
,
int
(
self
.
options
[
'parallel-test-database-amount'
])):
mysql_script_list
.
append
(
self
.
substituteTemplate
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment