Commit 31e3a7e5 authored by Aurel's avatar Aurel

testUpgradeInstanceWithOldDataFs: add required dependencies

parent 1b45f3e6
...@@ -66,6 +66,8 @@ class TestUpgradeInstanceWithOldDataFs(ERP5TypeTestCase): ...@@ -66,6 +66,8 @@ class TestUpgradeInstanceWithOldDataFs(ERP5TypeTestCase):
'erp5_code_mirror', 'erp5_code_mirror',
'erp5_multimedia', 'erp5_multimedia',
'erp5_smart_assistant', 'erp5_smart_assistant',
'erp5_notebook',
'erp5_run_my_doc',
'erp5_officejs', 'erp5_officejs',
'erp5_configurator_standard_trade_template', 'erp5_configurator_standard_trade_template',
'erp5_upgrader') 'erp5_upgrader')
......
  • @aurel I think we don't need to do this.

    Is it for an error like this ?

    BusinessTemplateMissingDependency: While analysing erp5_officejs the following dependency could not be satisfied: erp5_notebook ()
    Reason: Business Template could not be found in the repositories

    We discussed this in a3c0e2f6 (comment 122211) and fixed in 39d735e4

    Maybe the problem you are seeing is that you are using a too old slapos version where there will be no erp5-bin ? or a too old version of erp5-bin ?

    What is still not clear for me is how much adding business templates here is a problem. The idea of this test is that we have an old Data.fs that we use for --load and then we run upgrader in the test, to make sure that we can start and update an old instance with upgrader, but if we list some bt in getBusinessTemplateList, they will be installed by runUniTest, before actually the upgrader, so we might not be testing the upgrade if we add business templates in getBusinessTemplateList ... Maybe we should have a warning "don't add business templates to this list" in a code comment, but I did not look in details and I might be misunderstanding something here.

    If you can fix this by updating slapos / erp5-bin, please don't include this commit.

  • @jerome I see, thanks for the explanation. As test were failing with former cmf version, I reverted this commit. Now why I did it, because I have this error with new CMF :

    2020-12-29 15:50:48,209 INFO runTestSuite: BadRequest: The id "erp5" is invalid - it is already in use. 2020-12-29 15:50:48,209 INFO runTestSuite: Ran Unit test of <class 'testUpgradeInstanceWithOldDataFs.TestUpgradeInstanceWithOldDataFs'> (installation failed)

    So I tried to replicate it in my webrunner and the installation of bt5 was failing because those missing deps ( KeyError: 'Notebook Module' when installing erp5_officejs)

    Now that I had look at it a bit more, it seems I can't replicate the behaviour of test suite in my webrunner because it copies a former data.fs.

    From what I can see in the log (https://[2001:67c:1254:61:a915::ad5]:9080/crq-6aqdu22Yb7/suite.log) it is running 3 testsuite at the same time, maybe it causes conflict on the data.fs to be used...I don't know, I'm still investigating

    Edited by Aurel
  • bonne année @aurel

    Now that I had look at it a bit more, it seems I can't replicate the behaviour of test suite in my webrunner because it copies a former data.fs.

    Yes, the copy is done here, before running tests, but you can maybe do a first --save and replace Data.fs and dump.sql with the ones from https://lab.nexedi.com/nexedi/erp5-bin/tree/74ff7038e042de6b83ff141057f5d1d5410a4c8f/test_data/testUpgradeInstanceWithOldDataFs

    From what I can see in the log (https://[2001:67c:1254:61:a915::ad5]:9080/crq-6aqdu22Yb7/suite.log) it is running 3 testsuite at the same time, maybe it causes conflict on the data.fs to be used...I don't know, I'm still investigating

    Running multiple tests in parrallel should not be a problem, at least it's also what happens when running the tests on master.

    There is an interesting traceback in https://[2001:67c:1254:61:a915::ad5]:9080/crq-6aqdu22Yb7/testUpgradeInstanceWithOldDataFs/zLOG.log ( this is zLOG.log for this tests ):

    2020-12-29 14:50:35.233 WARNING ERP5Type.Dynamic Could not access Portal Type Object for type 'Property Sheet'
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/lazy_class.py", line 350, in loadClass
        is_partially_generated, class_definition = generatePortalTypeClass(site, portal_type)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/portal_type_class.py", line 273, in generatePortalTypeClass
        klass)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/accessor_holder.py", line 488, in createAllAccessorHolderList
        property_sheet_name_set))
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/accessor_holder.py", line 396, in getAccessorHolderList
        expression_context = createExpressionContext(site)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/Utils.py", line 1275, in createExpressionContext
        if pm is None or pm.isAnonymousUser():
    AttributeError: isAnonymousUser
    2020-12-29 14:50:35.235 WARNING ERP5Type.Dynamic Could not access Portal Type Object for type 'Property Sheet Tool'
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/lazy_class.py", line 350, in loadClass
        is_partially_generated, class_definition = generatePortalTypeClass(site, portal_type)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/portal_type_class.py", line 273, in generatePortalTypeClass
        klass)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/accessor_holder.py", line 488, in createAllAccessorHolderList
        property_sheet_name_set))
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/dynamic/accessor_holder.py", line 396, in getAccessorHolderList
        expression_context = createExpressionContext(site)
      File "/srv/slapgrid/slappart15/srv/testnode/crq/soft/bca65a55aa421a98957a7f05044101df/parts/erp5/product/ERP5Type/Utils.py", line 1275, in createExpressionContext
        if pm is None or pm.isAnonymousUser():
    AttributeError: isAnonymousUser
  • Thanks for the clue. This is because portal_membership is still broken at this moment and will be migrated later. Hopefully, 3e5c5c52 will fix it

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