• Jérome Perrin's avatar
    erp5: start runUnitTest's zserver on the partition IP · d17377ca
    Jérome Perrin authored
    We don't want runUnitTest is to listen on 127.0.0.1, as it is not
    allowed for SlapOS instances, runUnitTest wrapper is extended to include
    `--zserver` with a pre-assigned ip:port.
    
    runTestSuite starts several test in parrallel (controlled by
    `--node_quantity` argument, which is passed by erp5testnode), so we need
    to make sure that we provide it with enough ip:port. For this, we
    extended runTestSuite with a `--zserver_address_list` argument and we
    generate a wrapper with a list of pre-assigned ip:ports. The length of
    this list is also controlled by `mariadb.test-database-amount` instance
    parameter (eventhough it's slightly different).
    
    Because zelenium tests needs to access this zserver over a secure origin
    (otherwise modern browser features such as service worker are not
    available), add an https proxy in the apache from the balancer
    partition.
    
    runUnitTest and runTestSuite have been extended with resp.
    `--zserver_frontend_url` and `--zserver_frontend_url_list` arguments and
    the URLs published by the balancer paritions are set in the wrappers.
    
    This introduces a circular depencency, balancer partition needs to know
    the address of the testrunners and zope partitions needs to know the
    URLs of the corresponding http proxies on the apache. This is is handled
    by `slapos.recipe:publish-early`:
    
     1. request zope family with an empty `test-runner-apache-url-list`.
        zope is instanciated a first time.
        zope returns `test-runner-address-list` ( a list of (host, port)
        tuples )
     2. request balancer with `test-runner-address-list`
        balancer is instanciated.
        balancer returns `{{ family_name }}-test-runner-url-list` ( a list
        of apache URLs ), which are published in the root partition.
     3. zope family is re-requested with
        updated`test-runner-apache-url-list` information
    
    instance-erp5.cfg.in template was also reorganised to move
    `[publish-early]` next to `[publish]` at the bottom of the file.
    
    Document the existing behavior that setting mariadb.test-database-amount
    to 0 disable the creation of testrunner.
    d17377ca
buildout.hash.cfg 2.63 KB