Skip to content

Draft: tests: save and upload coverage data while setSite is still active

Jérome Perrin requested to merge fix/coverage-erp5 into master

To be able to import components, it's required to have a request and a site set. The previous approach of saving and uploading in the slapos generate runUnitTest sometimes caused error like this when importing modules:

 Traceback (most recent call last):
   File "SR/bin/runUnitTest", line 363, in <module>
     import Products.ERP5Type.tests.coverage_report
   File "SR/parts/erp5/product/ERP5Type/dynamic/component_package.py", line 358, in find_module
     erp5.component.createFilesystemImportDict()
   File "SR/parts/erp5/product/ERP5Type/dynamic/component_package.py", line 189, in createFilesystemImportDict
     component_tool = aq_base(getSite().portal_components)
   File "SR/parts/erp5/product/ERP5/ERP5Site.py", line 273, in __get
     app, site_id = self.site[-1]
 IndexError: list index out of range

Merge request reports