mirror of
https://github.com/odoo/runbot.git
synced 2025-03-19 09:25:46 +07:00
![]() Adds an `override` mergebot command. The ability to override is set on an individual per-context per-repository basis, similar to but independent from review rights. That is, a given individual may be able to override the status X on repository A and unable to do so on repository B. Overrides are stored in the same format as regular statuses, but independent from them in order to persist them across builds. Only PR statuses can be overridden, statuses which are overridable on PRs would simply not be required on stagings. An alternative to implementing this feature in the mergebot would be to add it to individual status-generating tools on a per-need basis. Pros of that alternative: * display the correct status on PRs, currently the PR will be failing status-wise (on github) but correct as far as the mergebot is concerned * remove complexity from the mergebot Cons of that alternative: * each status-generating tool would have to implement some sort of ACL system * each status-generating tool would have to receive & parse PR comments * each status-generating tool would have to maintain per-pr state in order to track overrides Some sort of helper library / framework ought make that rather easy though. It could also be linked into the central provisioning system thing. Closes #376 |
||
---|---|---|
.. | ||
conftest.py | ||
README.rst | ||
test_basic.py | ||
test_by_branch.py | ||
test_multirepo.py | ||
test_oddities.py | ||
test_utils.py |
Execute this test suite using pytest. The default mode is to run tests locally using a mock github.com. See the docstring of remote.py for instructions to run against github "actual" (including remote-specific options) and the end of this file for a sample. Shared properties running tests, regardless of the github implementation: * test should be run from the root of the runbot repository providing the name of this module aka ``pytest runbot_merge`` or ``python -mpytest runbot_merge`` * a database name to use must be provided using ``--db``, the database should not exist beforehand * the addons path must be specified using ``--addons-path``, both "runbot" and the standard addons (odoo/addons) must be provided explicitly See pytest's documentation for other options, I would recommend ``-rXs``, ``-v`` and ``--showlocals``. When running "remote" tests as they take a very long time (hours) ``-x`` (aka ``--maxfail=1``) and ``--ff`` (run previously failed first) is also recommended unless e.g. you run the tests overnight. ``pytest.ini`` sample --------------------- .. code:: ini [github] owner = test-org token = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [role_reviewer] name = Dick Bong user = loginb token = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb [role_self_reviewer] name = Fanny Chmelar user = loginc token = cccccccccccccccccccccccccccccccccccccccc [role_other] name = Harry Baals user = logind token = dddddddddddddddddddddddddddddddddddddddd