Set the noop_run parameter to False

Follow changes in the internal API of fuelclient. The noop_run parameter
is positional and required now.

Change-Id: Ie9d3eb765879ed52e5c22de93fbe2cc4bc54fd10
Related-Bug: #1617993
This commit is contained in:
Ilya Kharin 2016-09-11 01:17:22 +03:00
parent 27531efb95
commit f9d9919da5
2 changed files with 13 additions and 1 deletions

View File

@ -268,6 +268,18 @@ def test_move_nodes(mocker, mock_subprocess, provision, compat):
assert mock_wait_for.call_args_list == []
def test_deploy_nodes_without_tasks(mocker):
env = mock.Mock()
nodes = [mock.Mock(), mock.Mock()]
tasks_to_skip = ['task-0', 'task-1']
mock_wait = mocker.patch("octane.util.env.wait_for_nodes_tasks")
env_util.deploy_nodes_without_tasks(env, nodes, tasks_to_skip)
env.get_tasks.assert_called_once_with(skip=tasks_to_skip)
env.execute_tasks.assert_called_once_with(
nodes, env.get_tasks.return_value, force=False, noop_run=False)
mock_wait.assert_called_once_with(env, nodes)
@pytest.mark.parametrize("env_id,expected_url", [
(42, 'clusters/42/generated'),
])

View File

@ -213,7 +213,7 @@ def provision_nodes(env, nodes):
def deploy_nodes_without_tasks(env, nodes, skipped_tasks):
tasks_to_execute = env.get_tasks(skip=skipped_tasks)
env.execute_tasks(nodes, tasks_to_execute, False)
env.execute_tasks(nodes, tasks_to_execute, force=False, noop_run=False)
LOG.info("Nodes deploy started. Please wait...")
wait_for_nodes_tasks(env, nodes)