Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Xavier Thompson
erp5
Commits
e98c9347
Commit
e98c9347
authored
Sep 30, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! runUnitTest: ZODB is removed on '--save', so also remove all the tables of the SQL database
parent
9173e37a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
product/ERP5Type/tests/custom_zodb.py
product/ERP5Type/tests/custom_zodb.py
+4
-5
No files found.
product/ERP5Type/tests/custom_zodb.py
View file @
e98c9347
...
...
@@ -56,15 +56,14 @@ if load:
_print
(
"Could not find MySQL dump (%r), will recreate catalog ... "
%
dump_sql_path
)
os
.
environ
[
'erp5_tests_recreate_catalog'
]
=
'1'
_print
(
"Restoring static files ... "
)
el
if
sav
e
:
if
not
(
neo_storage
or
zeo_client
)
and
os
.
path
.
exists
(
data_fs_path
):
el
s
e
:
if
save
and
not
(
neo_storage
or
zeo_client
)
and
os
.
path
.
exists
(
data_fs_path
):
_print
(
"About to remove existing Data.fs %s (press Ctrl+C to abort)"
%
data_fs_path
)
time
.
sleep
(
5
)
os
.
remove
(
data_fs_path
)
# Whether passing --save or not passing both --load and --save, the catalog
# must be cleared of data from previous execution if any
if
not
load
:
# Whether passing --save or not passing both --load and --save, the catalog
# must be cleared of data from previous execution if any
_print
(
"Catalog will be recreated to clear data (if any) from previous execution"
)
import
Products.ZMySQLDA.db
sql_db
=
Products
.
ZMySQLDA
.
db
.
DB
(
os
.
environ
[
'erp5_sql_connection_string'
])
...
...
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