Skip to content

ERP5 tests: add all repository URLs when creating the site

Thomas Gambier requested to merge tomo/erp5:tests_use_bt5_repository_url into master

When creating the site, the function setUpERP5Site (https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5Type/tests/ERP5TypeTestCase.py#L1143) of tests will install the BT listed in getBusinessTemplateList() but it won't set the repository_dict of template tool.

In order to find the repositories, we are using the variable erp5_tests_bt5_path in _getBTPathAndIdList.

In testSlapOSMixin we need to override _getSiteCreationParameterDict to set the bt5_repository_url argument of create_site which I think we whouldn't need.

The current behaviour is confusing because for a "real" installation of ERP5, we are using the argument bt5_repository_url (from initsite product-config) which is the same as erp5_tests_bt5_path`. But in "tests" installation, we don't have anything setup in repository_dict by default.

Merge request reports