예제 #1
0
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)