Commit 06f11900 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Ignore bt5s from test or only present on production to compare the dump

This makes dev instance and production the similar.
parent 775e9ffe
...@@ -25,7 +25,8 @@ if show_all or configuration == "builder": ...@@ -25,7 +25,8 @@ if show_all or configuration == "builder":
if show_all or configuration == "bt": if show_all or configuration == "bt":
expected_file = portal.expected_business_template_dumped_configuration expected_file = portal.expected_business_template_dumped_configuration
found = portal.ERP5Site_dumpInstalledBusinessTemplateList() found = portal.ERP5Site_dumpInstalledBusinessTemplateList(
ignore_business_template_list=["rapid_space_web_site"])
print resolveDiff("Business Template Configuration Diff", expected_file, found) print resolveDiff("Business Template Configuration Diff", expected_file, found)
if show_all or configuration == "order_builder": if show_all or configuration == "order_builder":
......
...@@ -28,23 +28,27 @@ class TestSlapOSDump(SlapOSTestCaseMixin): ...@@ -28,23 +28,27 @@ class TestSlapOSDump(SlapOSTestCaseMixin):
self.portal.portal_alarms[alarm_id].setEnabled(1) self.portal.portal_alarms[alarm_id].setEnabled(1)
##### #####
issue_count = 0 issue_count = 0
for dump, filename in [ for dump, filename, kwargs in [
('ERP5Site_dumpAlarmToolConfiguration', 'expected_alarm_tool_dumped_configuration'), ('ERP5Site_dumpAlarmToolConfiguration', 'expected_alarm_tool_dumped_configuration', None),
('ERP5Site_dumpBuilderList', 'expected_builder_dumped_configuration'), ('ERP5Site_dumpBuilderList', 'expected_builder_dumped_configuration', None),
('ERP5Site_dumpInstalledBusinessTemplateList', 'expected_business_template_dumped_configuration'), ('ERP5Site_dumpInstalledBusinessTemplateList', 'expected_business_template_dumped_configuration',
('ERP5Site_dumpOrderBuilderList', 'expected_order_builder_dumped_configuration'), {'ignore_business_template_list': ["erp5_ui_test_core"]}),
('ERP5Site_dumpPortalTypeActionList', 'expected_type_actions_dumped_configuration'), ('ERP5Site_dumpOrderBuilderList', 'expected_order_builder_dumped_configuration', None),
('ERP5Site_dumpPortalTypeList', 'expected_portal_type_dumped_configuration'), ('ERP5Site_dumpPortalTypeActionList', 'expected_type_actions_dumped_configuration', None),
('ERP5Site_dumpPortalTypeRoleList', 'expected_role_dumped_configuration'), ('ERP5Site_dumpPortalTypeList', 'expected_portal_type_dumped_configuration', None),
('ERP5Site_dumpPortalSkinsContent', 'expected_portal_skins_dumped_configuration'), ('ERP5Site_dumpPortalTypeRoleList', 'expected_role_dumped_configuration', None),
('ERP5Site_dumpPropertySheetList', 'expected_property_sheet_dumped_configuration'), ('ERP5Site_dumpPortalSkinsContent', 'expected_portal_skins_dumped_configuration', None),
('ERP5Site_dumpRuleTesterList', 'expected_rule_dumped_configuration'), ('ERP5Site_dumpPropertySheetList', 'expected_property_sheet_dumped_configuration', None),
('ERP5Site_dumpSkinProperty', 'expected_skin_property_dumped_configuration'), ('ERP5Site_dumpRuleTesterList', 'expected_rule_dumped_configuration', None),
('ERP5Site_dumpWorkflowChain', 'expected_workflow_dumped_configuration'), ('ERP5Site_dumpSkinProperty', 'expected_skin_property_dumped_configuration', None),
('ERP5Site_dumpWorkflowChain', 'expected_workflow_dumped_configuration', None),
]: ]:
ZopeTestCase._print('\n') ZopeTestCase._print('\n')
try: try:
if kwargs is None:
location = self.write('%s' % filename, getattr(self.portal, dump)()) location = self.write('%s' % filename, getattr(self.portal, dump)())
else:
location = self.write('%s' % filename, getattr(self.portal, dump)(**kwargs))
except Exception: except Exception:
ZopeTestCase._print('Problem with %s\n' % dump) ZopeTestCase._print('Problem with %s\n' % dump)
issue_count += 1 issue_count += 1
......
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