Commit a429604e authored by Romain Courteaud's avatar Romain Courteaud

slapos_configurator:

* XXX do not install slapos_subscription_request
  Everything should work without it.
  It will be rework later.
* update configurator test with new bt5/module
* slapos_subscription_request bt5 is installed again
* do not prevent slapos_category to be updated
  otherwise, new categories are not installed
* test: dropped module
* use backup cloudooo
  nexedi/slapos@a729a677
* test: manye dependencies have been dropped
* test: fixup rebase
* change module id generator
* portal_callables is not handle by the configurator
  See nexedi/erp5@a55b0f78
* test: cloudooo url order is random
* test: set convertion server with the constraint
* test: some bt5 were dropped
parent 7c18bc01
...@@ -6,7 +6,6 @@ bt5_update_catalog_list = bt5_installation_list ...@@ -6,7 +6,6 @@ bt5_update_catalog_list = bt5_installation_list
keep_bt5_id_list = ['erp5_ui_test', keep_bt5_id_list = ['erp5_ui_test',
'erp5_ui_test_core', 'erp5_ui_test_core',
'slapos_jio_ui_test', 'slapos_jio_ui_test',
'slapos_category',
# XXX erp5_accounting_l10n_fr should be removed when bug is fixed # XXX erp5_accounting_l10n_fr should be removed when bug is fixed
'erp5_accounting_l10n_fr', 'erp5_accounting_l10n_fr',
'erp5_secure_payment', 'erp5_secure_payment',
......
...@@ -39,7 +39,7 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -39,7 +39,7 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self.portal.portal_ids.fixConsistency() self.portal.portal_ids.fixConsistency()
self.assertEqual(self.portal.portal_ids.checkConsistency(), []) self.assertEqual(self.portal.portal_ids.checkConsistency(), [])
self.assertEqual(self.portal.person_module.getIdGenerator(), self.assertEqual(self.portal.person_module.getIdGenerator(),
"_generatePerDayId") "_generatePerDayNodeNumberId")
def testConfiguredShacacheWebSite(self): def testConfiguredShacacheWebSite(self):
""" Make sure Shacache WebSite is setuped by Alarm """ Make sure Shacache WebSite is setuped by Alarm
...@@ -56,12 +56,15 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -56,12 +56,15 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
""" Make sure Conversion Server was configured well, """ Make sure Conversion Server was configured well,
invoking checkConsistency """ invoking checkConsistency """
pref_tool = self.portal.portal_preferences pref_tool = self.portal.portal_preferences
self.assertEqual(pref_tool.checkConsistency(), []) self.portal.portal_preferences.fixConsistency()
consistency_list = pref_tool.checkConsistency()
self.assertEqual(len(consistency_list), 1)
self.assertEqual(str(consistency_list[0].message), 'The System Preference subscription assignment should have a destination_project')
# Check if configuration is properly set: # Check if configuration is properly set:
self.assertEqual( consistency_list = pref_tool.slapos_default_system_preference.SystemPreference_checkSystemPreferenceConsistency()
pref_tool.slapos_default_system_preference.SystemPreference_checkSystemPreferenceConsistency(), self.assertEqual(len(consistency_list), 1)
[]) self.assertEqual(str(consistency_list[0]), 'The System Preference subscription assignment should have a destination_project')
def testConfiguredCertificateAuthoringConstraint(self): def testConfiguredCertificateAuthoringConstraint(self):
"""Make sure Certificate Authoring was configured well, """Make sure Certificate Authoring was configured well,
...@@ -93,8 +96,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -93,8 +96,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
well configured.""" well configured."""
# set preference # set preference
preference_tool = self.portal.portal_preferences preference_tool = self.portal.portal_preferences
conversion_url = ["https://cloudooo.erp5.net/"] conversion_url = ["https://cloudooo.erp5.net/",
self.assertEqual(preference_tool.getPreferredDocumentConversionServerUrlList(), conversion_url) "https://cloudooo1.erp5.net/"]
self.assertSameSet(preference_tool.getPreferredDocumentConversionServerUrlList(), conversion_url)
def testConfiguredCertificateAuthoring(self): def testConfiguredCertificateAuthoring(self):
""" Make sure Certificate Authoting is """ Make sure Certificate Authoting is
...@@ -147,12 +151,12 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -147,12 +151,12 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
""" """
module_list = [module.getId() for module in self.portal.objectValues() module_list = [module.getId() for module in self.portal.objectValues()
if getattr(module, "getIdGenerator", None) is not None and \ if getattr(module, "getIdGenerator", None) is not None and \
module.getIdGenerator() == "_generatePerDayId"] module.getIdGenerator() == "_generatePerDayNodeNumberId"]
expected_module_list = [ expected_module_list = [
'access_token_module', 'access_token_module',
'account_module', 'account_module',
'accounting_module', 'accounting_module',
'bug_module', 'allocation_supply_module',
'business_configuration_module', 'business_configuration_module',
'business_process_module', 'business_process_module',
'campaign_module', 'campaign_module',
...@@ -174,7 +178,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -174,7 +178,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
'document_module', 'document_module',
'event_module', 'event_module',
'external_source_module', 'external_source_module',
'glossary_module',
'hosting_subscription_module', 'hosting_subscription_module',
'instance_tree_module', 'instance_tree_module',
'image_module', 'image_module',
...@@ -200,7 +203,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -200,7 +203,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
'person_module', 'person_module',
'portal_activities', 'portal_activities',
'portal_simulation', 'portal_simulation',
'portal_callables',
'product_module', 'product_module',
'project_module', 'project_module',
'purchase_order_module', 'purchase_order_module',
...@@ -223,18 +225,12 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -223,18 +225,12 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
'sale_trade_condition_module', 'sale_trade_condition_module',
'service_module', 'service_module',
'service_report_module', 'service_report_module',
'smart_assistant_file_module',
'smart_assistant_image_module',
'smart_assistant_sound_module',
'smart_assistant_text_module',
'software_installation_module', 'software_installation_module',
'software_instance_module', 'software_instance_module',
'software_licence_module', 'software_licence_module',
'software_product_module', 'software_product_module',
'software_publication_module', 'software_publication_module',
'software_release_module', 'software_release_module',
'sound_module',
'subscription_condition_module',
'subscription_request_module', 'subscription_request_module',
'support_request_module', 'support_request_module',
'system_event_module', 'system_event_module',
...@@ -243,7 +239,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -243,7 +239,6 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
'test_page_module', 'test_page_module',
'transformation_module', 'transformation_module',
'upgrade_decision_module', 'upgrade_decision_module',
'video_module',
'web_page_module', 'web_page_module',
'web_site_module', 'web_site_module',
'data_descriptor_module', 'data_descriptor_module',
...@@ -276,8 +271,8 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin): ...@@ -276,8 +271,8 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self.assertSameSet(module_list, expected_module_list) self.assertSameSet(module_list, expected_module_list)
self.assertEqual(self.portal.portal_simulation.getIdGenerator(), "_generatePerDayId") self.assertEqual(self.portal.portal_simulation.getIdGenerator(), "_generatePerDayNodeNumberId")
self.assertEqual(self.portal.portal_activities.getIdGenerator(), "_generatePerDayId") self.assertEqual(self.portal.portal_activities.getIdGenerator(), "_generatePerDayNodeNumberId")
def testConfiguredBusinessTemplateList(self): def testConfiguredBusinessTemplateList(self):
""" Make sure Installed business Templates are """ Make sure Installed business Templates are
......
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