Commit f441b95b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix pipeline status for transition between stages

parent 9bfff603
......@@ -31,6 +31,7 @@ module HasStatus
WHEN (#{builds})=(#{created})+(#{skipped})+(#{pending}) THEN 'pending'
WHEN (#{running})+(#{pending})>0 THEN 'running'
WHEN (#{manual})>0 THEN 'manual'
WHEN (#{created})>0 THEN 'running'
ELSE 'failed'
END)"
end
......
......@@ -110,6 +110,14 @@ describe HasStatus do
it { is_expected.to eq 'running' }
end
context 'when pipeline is in transition between stages' do
let!(:statuses) do
[create(type, status: :success), create(type, status: :created)]
end
it { is_expected.to eq 'running' }
end
context 'when one status is a blocking manual action' do
let!(:statuses) do
[create(type, status: :failed),
......
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