Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8dc92f67
Commit
8dc92f67
authored
Nov 17, 2021
by
Mark Lapierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error logging to help troubleshoot
parent
36e9d9f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
qa/qa/resource/events/base.rb
qa/qa/resource/events/base.rb
+1
-1
qa/qa/resource/events/project.rb
qa/qa/resource/events/project.rb
+4
-0
qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb
...ures/api/3_create/merge_request/push_options_mwps_spec.rb
+16
-8
No files found.
qa/qa/resource/events/base.rb
View file @
8dc92f67
...
...
@@ -4,7 +4,7 @@ module QA
module
Resource
module
Events
MAX_WAIT
=
60
RAISE_ON_FAILURE
=
tru
e
RAISE_ON_FAILURE
=
fals
e
EventNotFoundError
=
Class
.
new
(
RuntimeError
)
...
...
qa/qa/resource/events/project.rb
View file @
8dc92f67
...
...
@@ -25,6 +25,10 @@ module QA
wait_for_event
do
events
(
action:
'pushed'
).
any?
{
|
event
|
event
.
dig
(
:push_data
,
:commit_title
)
==
commit_message
}
end
rescue
EventNotFoundError
QA
::
Runtime
::
Logger
.
debug
(
"Push events:
#{
events
(
action:
'pushed'
)
}
"
)
raise
end
def
wait_for_push_new_branch
(
branch_name
=
self
.
default_branch
)
...
...
qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb
View file @
8dc92f67
...
...
@@ -25,8 +25,9 @@ module QA
end
end
after
do
after
do
|
example
|
runner
.
remove_via_api!
project
.
remove_via_api!
unless
example
.
exception
end
it
'sets merge when pipeline succeeds'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1240'
do
...
...
@@ -106,15 +107,22 @@ module QA
expect
(
merge_request
).
not_to
be_nil
,
"There was a problem creating the merge request"
expect
(
merge_request
[
:merge_when_pipeline_succeeds
]).
to
be
true
merge_request
=
Support
::
Waiter
.
wait_until
(
sleep_interval:
5
)
do
mr
=
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
mr
|
mr
.
project
=
project
mr
.
iid
=
merge_request
[
:iid
]
end
mr
=
nil
begin
merge_request
=
Support
::
Retrier
.
retry_until
(
max_duration:
60
,
sleep_interval:
5
,
message:
'The merge request was not merged'
)
do
mr
=
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
mr
|
mr
.
project
=
project
mr
.
iid
=
merge_request
[
:iid
]
end
next
unless
mr
.
state
==
'merged'
next
unless
mr
.
state
==
'merged'
mr
end
rescue
Support
::
Repeater
::
WaitExceededError
QA
::
Runtime
::
Logger
.
debug
(
"MR:
#{
mr
.
api_response
}
"
)
mr
raise
end
expect
(
merge_request
.
state
).
to
eq
(
'merged'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment