Merge "Fix wrong ready status instead of stopped for stop deployment"
This commit is contained in:
commit
2f01ecc857
|
@ -124,10 +124,10 @@ module Astute
|
||||||
def node_report_status
|
def node_report_status
|
||||||
if !finished?
|
if !finished?
|
||||||
{}
|
{}
|
||||||
elsif successful?
|
|
||||||
cluster.node_statuses_transitions.fetch('successful', {})
|
|
||||||
elsif skipped?
|
elsif skipped?
|
||||||
cluster.node_statuses_transitions.fetch('stopped', {})
|
cluster.node_statuses_transitions.fetch('stopped', {})
|
||||||
|
elsif successful?
|
||||||
|
cluster.node_statuses_transitions.fetch('successful', {})
|
||||||
else
|
else
|
||||||
cluster.node_statuses_transitions.fetch('failed', {})
|
cluster.node_statuses_transitions.fetch('failed', {})
|
||||||
end
|
end
|
||||||
|
|
|
@ -378,6 +378,27 @@ describe Astute::TaskNode do
|
||||||
})
|
})
|
||||||
task_node.poll
|
task_node.poll
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should report stopped if node skipped' do
|
||||||
|
cluster.node_statuses_transitions['stopped'] = {
|
||||||
|
'status' => 'stopped'
|
||||||
|
}
|
||||||
|
cluster.node_statuses_transitions['successful'] = {
|
||||||
|
'status' => 'ready'
|
||||||
|
}
|
||||||
|
|
||||||
|
task_node.set_status_skipped
|
||||||
|
task_node.stubs(:finished?).returns(true)
|
||||||
|
task_node.stubs(:successful?).returns(true)
|
||||||
|
|
||||||
|
ctx.expects(:report).with({
|
||||||
|
'nodes' => [{
|
||||||
|
'uid' => 'node_id',
|
||||||
|
'status' => 'stopped',
|
||||||
|
'progress' => 100}]
|
||||||
|
})
|
||||||
|
task_node.report_node_status
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should report error if task failed and no more task' do
|
it 'should report error if task failed and no more task' do
|
||||||
|
|
Loading…
Reference in New Issue