mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 18:46:10 +10:00
yellow jenkins -> failed build
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ class JenkinsService < CiService
|
||||
if response.code == 200
|
||||
# img.build-caption-status-icon for old jenkins version
|
||||
src = Nokogiri.parse(response).css('img.build-caption-status-icon,.build-caption>img').first.attributes['src'].value
|
||||
if src =~ /(blue\.png|yellow\.png)$/
|
||||
if src =~ /blue\.png$/
|
||||
'success'
|
||||
elsif src =~ /(red|aborted|yellow)\.png$/
|
||||
'failed'
|
||||
|
||||
@@ -45,7 +45,7 @@ eos
|
||||
end
|
||||
|
||||
describe :commit_status do
|
||||
statuses = {'blue.png' => 'success', 'yellow.png' => 'success', 'red.png' => 'failed', 'aborted.png' => 'failed', 'blue-anime.gif' => 'running', 'grey.png' => 'pending'}
|
||||
statuses = {'blue.png' => 'success', 'yellow.png' => 'failed', 'red.png' => 'failed', 'aborted.png' => 'failed', 'blue-anime.gif' => 'running', 'grey.png' => 'pending'}
|
||||
statuses.each do |icon, state|
|
||||
it "should have a status of #{state} when the icon #{icon} exists." do
|
||||
stub_request(:get, "http://jenkins.gitlab.org/projects/2/scm/bySHA1/2ab7834c").to_return(status: 200, body: status_body_for_icon(icon), headers: {})
|
||||
|
||||
Reference in New Issue
Block a user