Commit e98c9347 authored by Julien Muchembled's avatar Julien Muchembled

fixup! runUnitTest: ZODB is removed on '--save', so also remove all the tables of the SQL database

parent 9173e37a
......@@ -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 ... ")
elif save:
if not (neo_storage or zeo_client) and os.path.exists(data_fs_path):
else:
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'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment