summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArtem Goncharov <Artem.goncharov@gmail.com>2021-08-26 16:52:40 +0200
committerArtem Goncharov <artem.goncharov@gmail.com>2021-09-30 15:10:24 +0000
commit617d2ef1c60686c26b7468b6c855540395bc5feb (patch)
tree05b73063875b1519f5dfb4209aecab544c57d890 /tests
parent5858510e221bb4904d81331d681a68bb0c4b0f9a (diff)
downloadzuul-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.py2
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)