mirror of
https://github.com/odoo/runbot.git
synced 2025-03-19 09:25:46 +07:00
![]() This was the root cause of the incident of Feb 13/14: because the patcher pushed to the local branch before pushing to the remote failing to push to the remote would leave the local ref broken, as `fetch("refs/heads/*:refs/heads/*")` apparently does not do non-ff updates (which does make some sense I guess). So in this case a staging finished, was pushed to the remote, then git delayed the read side just enough that when the patcher looked up the target it got the old commit. It applied a patch on top of that, tried to push, and got a failure (non-ff update), which led the local and remote branches divergent, and caused any further update of the local reference branches to fail, thus every forward port to be blocked. Using symbolic branches during patching was completely dumb (and updating the local branch unnecessary), so switch the entire thing to using just commits, and update a bunch of error reporting while at it. |
||
---|---|---|
.. | ||
conftest.py | ||
README.rst | ||
test_basic.py | ||
test_batch_consistency.py | ||
test_by_branch.py | ||
test_dfm.py | ||
test_disabled_branch.py | ||
test_multirepo.py | ||
test_nondeterministic_failures.py | ||
test_oddities.py | ||
test_patching.py | ||
test_project_toggles.py | ||
test_provisioning.py | ||
test_staging.py | ||
test_status_overrides.py | ||
test_statuses_optional.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