Commit 7bb4864f authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_configurator: Test if bt5 dependency resolution gives the expected bt5 list.

See merge request nexedi/slapos.core!592
parents be4a936c ea72a267
......@@ -272,3 +272,20 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self.assertSameSet(expected_business_template_list,
self.portal.portal_templates.getInstalledBusinessTemplateTitleList())
def testConfiguredExpectedBusinessTemplateDependencyList(self):
""" Make sure TemplateTool_getSlapOSMasterBusinessTemplateList dependency resolution
provides the expected bt5 list. """
expected_business_template_list = self.getExpectedBusinessTemplateInstalledAfterConfiguration()
# If mixin contains a custom definition that introduce new business templated from
# the project scope, them include it on expected list.
expected_business_template_list.extend(self._custom_additional_bt5_list)
bt5_to_resolve, _, _ = self.portal.portal_templates.TemplateTool_getSlapOSMasterBusinessTemplateList()
bt5_list = [i[1] for i in self.portal.portal_templates.resolveBusinessTemplateListDependency(
template_title_list=bt5_to_resolve,
with_test_dependency_list=True)]
self.assertSameSet(expected_business_template_list, bt5_list)
......@@ -179,7 +179,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_accounting/SubscriptionRequest_setAggregatedConsumptionDelivery',
'slapos_configurator/BusinessConfiguration_runPostUpgradeConsistency',
'slapos_configurator/BusinessConfiguration_setupSlapOSMasterStandardBT5',
'slapos_configurator/TemplateTool_getSlapOSMasterBusinessTemplateList',
'slapos_consumption/Base_getConsumptionListAsODSReport',
'slapos_consumption/Base_getResourceServiceTitleUitList',
'slapos_consumption/Base_getUserConsumptionDetailList',
......
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