15ef181d26
The current Gerrit simulated merge operation simply resets the target branch to the specified change's commit -- it doesn't actually perform a git merge operation as gerrit (typically) would. This makes some test situations difficult, such as when we want to rely on a post-merge pipeline preparing git repos on top of previously merged changes. This change actually performs git merge operations when gerrit changes are merged in tests, so the result should be far more realistic. One test relied on a side effect of the old behavior: test_zuul_trigger_project_change_merged This test merges change A and then performed a merge check on change B, which conflicts, and then reports Verified -1. It then repeats the test by merging change D which conflicts with change E which should also receive Verified -1. However, the test inadvertently ran a second merge check on change B when change D merged, but because it tested D as written instead of merged on top of A after A was merged, the conflict of B against A was not seen (because B does not conflict with D) and therefore not rported. With this patch, the conflict of B against the merged change A is seen and the test failed because it reported B's merge conflict twice. To correct this, we make the test even more realistic by adding a pipeline requirement that we have not already reported Verified -1 in order to enqueue a change for merge-check. In order for this to work, we need to make sure Zuul sees the comment-added events for the Verified -1 votes (so that the Gerrit driver updates its view of the votes on the change), so those are added to the test. Change-Id: Ia5b4b83096de3b8719c8b6d256e8e33749e7a5b8 |
||
---|---|---|
.. | ||
parent-change-enqueued | ||
parent-change-enqueued-github | ||
project-change-merged |