Commit bace5274 authored by Dan Davison's avatar Dan Davison

Merge branch 'ml-fail-on-git-error-in-output' into 'master'

Treat git commands as failed if output has errors

See merge request gitlab-org/gitlab!43237
parents 23d40ead deb2c7a7
......@@ -224,7 +224,7 @@ module QA
alias_method :to_s, :response
def success?
exitstatus == 0
exitstatus == 0 && !response.include?('Error encountered')
end
end
......
......@@ -30,6 +30,7 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
expect(merge_request[:labels]).to include('one').and include('two').and include('three')
end
......@@ -49,6 +50,8 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
aggregate_failures do
expect(merge_request[:labels]).to include('two')
expect(merge_request[:labels]).not_to include('one')
......
......@@ -60,6 +60,8 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
merge_request = Resource::MergeRequest.fabricate_via_api! do |mr|
mr.project = project
mr.id = merge_request[:iid]
......@@ -101,6 +103,7 @@ module QA
merge_request = project.merge_request_with_title(title)
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
......
......@@ -30,6 +30,8 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
merge_request = Resource::MergeRequest.fabricate_via_api! do |mr|
mr.project = project
mr.id = merge_request[:iid]
......
......@@ -38,6 +38,7 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
expect(merge_request[:target_branch]).to eq(target_branch)
merge_request = Resource::MergeRequest.fabricate_via_api! do |mr|
......
......@@ -30,6 +30,8 @@ module QA
merge_request = project.merge_request_with_title(title)
expect(merge_request).not_to be_nil, "There was a problem creating the merge request"
aggregate_failures do
expect(merge_request[:title]).to eq(title)
expect(merge_request[:description]).to eq(description)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment