diff options
author | Artem Goncharov <Artem.goncharov@gmail.com> | 2021-08-26 16:52:40 +0200 |
---|---|---|
committer | Artem Goncharov <artem.goncharov@gmail.com> | 2021-09-30 15:10:24 +0000 |
commit | 617d2ef1c60686c26b7468b6c855540395bc5feb (patch) | |
tree | 05b73063875b1519f5dfb4209aecab544c57d890 /tests | |
parent | 5858510e221bb4904d81331d681a68bb0c4b0f9a (diff) | |
download | zuul-617d2ef1c60686c26b7468b6c855540395bc5feb.tar.gz |
Fix failed merge detection in gitlab
gitlab is funny in that it can return status_code=200 with an error in
the body. This can happen when MR accept request fails (i.e. when
project requires squashing, but we have not done this). Ensure status of
the MR is "merged" otherwise return "merge_error" attribute as a failure
description.
Change-Id: I343fb08cdf58fdf6d2068e274a89a34a55adde5a
Diffstat (limited to 'tests')
-rw-r--r-- | tests/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/base.py b/tests/base.py index a8ba5ea6b..d0c5fb16c 100644 --- a/tests/base.py +++ b/tests/base.py @@ -2156,7 +2156,7 @@ class FakeGitlabAPIClient(gitlabconnection.GitlabAPIClient): mr = self._get_mr(match) mr.mergeMergeRequest() - return {}, 200, "", "PUT" + return {'state': 'merged'}, 200, "", "PUT" def addProject(self, project): self.addProjectByName(project.name) |