Commit 624a74f3 authored by Ivan Tyagov's avatar Ivan Tyagov

This script can be used for deployment tests which do not require these...

This script can be used for deployment tests which do not require these changes thus make it configurable but still keeping the default behaviour as it was.
parent a24f56d6
...@@ -11,7 +11,8 @@ portal_catalog = portal.portal_catalog ...@@ -11,7 +11,8 @@ portal_catalog = portal.portal_catalog
status_code = 0 status_code = 0
error_message = "No error." error_message = "No error."
context.ERP5Site_setUpActivityTool() if setup_activity_tool:
context.ERP5Site_setUpActivityTool()
if user_quantity is None: if user_quantity is None:
return json.dumps({"status_code" : 1, return json.dumps({"status_code" : 1,
...@@ -42,12 +43,14 @@ if configurator.getSimulationState() == "draft": ...@@ -42,12 +43,14 @@ if configurator.getSimulationState() == "draft":
# create users if installation is done # create users if installation is done
try: try:
context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup', if create_test_data:
'immediateReindexObject') context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup',
).ERP5Site_createTestData(user_quantity, password) 'immediateReindexObject')
context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup', ).ERP5Site_createTestData(user_quantity, password)
'immediateReindexObject') if set_id_generator:
).ERP5Site_setIdGenerator() context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup',
'immediateReindexObject')
).ERP5Site_setIdGenerator()
except Exception as e: except Exception as e:
status_code = 1 status_code = 1
error_message = "Error calling ERP5Site_createTestData script: " + str(e) error_message = "Error calling ERP5Site_createTestData script: " + str(e)
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>user_quantity=None</string> </value> <value> <string>user_quantity=None, setup_activity_tool=True, create_test_data=True, set_id_generator=True</string> </value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard</string> </key>
......
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