[ADD] runbot_merge: untested case, failed non-required status

Ensure that a non-required status failing does not trigger a
notification message.

Closes #388
This commit is contained in:
Xavier Morel 2020-07-22 10:01:28 +02:00 committed by xmo-odoo
parent 7781d8b09c
commit 8364dded3e

View File

@ -924,12 +924,14 @@ def test_ci_failure_after_review(env, repo, users, config):
env.run_crons()
with repo:
repo.post_status(prx.head, 'failure', 'ci/runbot')
repo.post_status(prx.head, 'success', 'legal/cla')
repo.post_status(prx.head, 'failure', 'ci/runbot', target_url="https://a")
repo.post_status(prx.head, 'failure', 'legal/cla', target_url="https://b")
repo.post_status(prx.head, 'failure', 'foo/bar', target_url="https://c")
env.run_crons()
assert prx.comments == [
(users['reviewer'], 'hansen r+'),
(users['user'], "'legal/cla' failed on this reviewed PR.".format_map(users)),
(users['user'], "'ci/runbot' failed on this reviewed PR.".format_map(users)),
]