Commit dee19d7d authored by Ivan Tyagov's avatar Ivan Tyagov

Make script more generic so both scalability and deployment tests could use it.

parent f27a9a0b
...@@ -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,10 +43,12 @@ if configurator.getSimulationState() == "draft": ...@@ -42,10 +43,12 @@ 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:
context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup',
'immediateReindexObject') 'immediateReindexObject')
).ERP5Site_createTestData(user_quantity, password) ).ERP5Site_createTestData(user_quantity, password)
context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup', if set_id_generator:
context.portal_categories.activate(after_method_id = ('ERP5Site_afterConfigurationSetup',
'immediateReindexObject') 'immediateReindexObject')
).ERP5Site_setIdGenerator() ).ERP5Site_setIdGenerator()
except Exception as e: except Exception as 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