Commit c1f477ff authored by Jérome Perrin's avatar Jérome Perrin

configurator_standard: sense check consistency alarm after configurator

check_consistency alarm checks that every document created satisfy
contraints. This is done in order to verify that configurator it self
create consistent documents and also that all default documents from a
realistic configuration are consistent.
parent 7c635bf1
...@@ -75,6 +75,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -75,6 +75,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
stepCheckPurchaseSimulationScenario stepCheckPurchaseSimulationScenario
stepCheckSaleInvoiceAccountFallback stepCheckSaleInvoiceAccountFallback
stepCheckPurchaseInvoiceAccountFallback stepCheckPurchaseInvoiceAccountFallback
stepCheckConsistencyAlarm
''' '''
SECURITY_CONFIGURATION_SEQUENCE = """ SECURITY_CONFIGURATION_SEQUENCE = """
...@@ -1871,6 +1872,34 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -1871,6 +1872,34 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
(100, 0, self.portal.account_module.purchase, None), (100, 0, self.portal.account_module.purchase, None),
]) ])
def stepCheckConsistencyAlarm(self, sequence):
"""Use erp5_administration's check_consistency alarm to verify that
in all modules and tools that there are no inconsistent documents after the
configuration.
"""
self.login()
# clone the check consistency alarm and enable it for all modules, except:
# - business_configuration_module, because most configurator item do not
# implement checkConsistency fully - they only support applying the
# configuration, but not comparing the current state with the expected
# state. Fixing the configurator items is a TODO, then we can enable
# the check here.
# - web_site_module, because web sites and web sections have some upgrader
# constraints that we don't run as part as configurator. TODO: probably
# we should integrate more configurator and upgrader, so that we run
# these.
alarm = self.portal.portal_alarms.check_consistency.Base_createCloneDocument(batch_mode=True)
alarm.setProperty(
'module_list',
[m[1] for m in alarm.Alarm_viewConsistencyCheckConfiguration.my_module_list.get_value('items')
if m[1] not in ('business_configuration_module', 'web_site_module',)])
alarm.activeSense()
self.tic()
self.maxDiff = None
self.assertEqual(
[r.constraint_message_list for r in alarm.getLastActiveProcess().getResultList()], [])
self.assertFalse(alarm.sense())
class TestConsultingConfiguratorWorkflow(StandardConfigurationMixin): class TestConsultingConfiguratorWorkflow(StandardConfigurationMixin):
""" """
......
erp5_full_text_mroonga_catalog erp5_full_text_mroonga_catalog
erp5_administration
\ No newline at end of file
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