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

forge: fix random failures with testTemplateTool

getRepositoryList contain all business template repositories, ie:

      ['/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5-doc/bt5',
       '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5/bt5',
       '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5/product/ERP5/bootstrap',
       '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5-bin/bt5']

it seems in random order.

Test was written to use the one from parts/erp5/bt5, but since it just
takes "anything which does not contain bootstrap" it was sometimes getting
erp5-bin or erp5-doc and could not find erp5_configurator_standard business
template.

Change the selection of the repository to take into account that we may also
have erp5-doc and erp5-bin and so that it fails if more than one.
parent b512c173
Pipeline #11592 failed with stage
......@@ -625,9 +625,12 @@ class TestTemplateTool(ERP5TypeTestCase):
# turn depends on erp5_workflow
bt5_name_list = ['erp5_configurator_standard']
template_tool = self.portal.portal_templates
for repos in template_tool.getRepositoryList():
if "bootstrap" not in repos:
repository = repos
repository, = [
repo for repo in template_tool.getRepositoryList() if
'/bootstrap' not in repo
and '/erp5-bin' not in repo
and '/erp5-doc' not in repo]
self.tic()
for bt5_name in bt5_name_list:
bt = template_tool.getInstalledBusinessTemplate(bt5_name)
......
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