Fetch noop_run option from deployment_options

Currently noop_run option is fetching from tasks_metadata, but from
nailgun side it is passed as deployment_option.

Change-Id: Id07c5ecd83fc37a95f7f289879459ee5d7aebd7c
This commit is contained in:
Denis Egorenko 2016-08-23 20:15:03 +03:00
parent f16188ec3b
commit 45abdd12bf
3 changed files with 6 additions and 7 deletions

View File

@ -92,7 +92,8 @@ module Astute
:tasks_graph => data['args'].fetch('tasks_graph', {}),
:tasks_directory => data['args'].fetch('tasks_directory', {}),
:tasks_metadata => data['args'].fetch('tasks_metadata', {}),
:dry_run => data['args'].fetch('dry_run', false)
:dry_run => data['args'].fetch('dry_run', false),
:noop_run => data['args'].fetch('noop_run', false)
}
)
rescue Timeout::Error

View File

@ -48,10 +48,7 @@ module Astute
'fault_tolerance_groups',
[]
)
cluster.noop_run = tasks_metadata.fetch(
'noop_run',
false
)
cluster.noop_run = deployment_options.fetch(:noop_run, false)
cluster.node_statuses_transitions = tasks_metadata.fetch(
'node_statuses_transitions',

View File

@ -305,9 +305,10 @@ describe Astute::TaskDeployment do
Astute::TaskCluster.any_instance.expects(:run).returns({:success => true})
task_deployment.deploy(
tasks_metadata: tasks_metadata.merge({'noop_run' => true}),
tasks_metadata: tasks_metadata,
tasks_graph: tasks_graph,
tasks_directory: tasks_directory)
tasks_directory: tasks_directory,
noop_run: true)
end
end