@pytest.mark.parametrize('bin_file', [
(bin_file_path1),
(bin_file_path2)])
+@mock.patch('deploy.daisy_server.time.sleep')
@mock.patch.object(daisy_server.DaisyServer, 'delete_dir')
@mock.patch.object(daisy_server.DaisyServer, 'scp_put')
@mock.patch.object(daisy_server.DaisyServer, 'create_dir')
mock_create_dir,
mock_scp_put,
mock_delete_dir,
+ mock_sleep,
bin_file,
tmpdir):
DaisyServerInst = DaisyServer(daisy_server_info['name'],
tmpdir.remove()
+@mock.patch('deploy.environment.time.sleep')
@mock.patch.object(daisy_server.DaisyServer, 'prepare_cluster')
@mock.patch.object(environment.BareMetalEnvironment, 'reboot_nodes')
@mock.patch.object(daisy_server.DaisyServer, 'prepare_host_and_pxe')
def test_deploy_BareMetalEnvironment(mock_post_deploy, mock_check_openstack_installation,
mock_check_os_installation, mock_prepare_host_and_pxe,
mock_reboot_nodes, mock_prepare_cluster,
+ mock_sleep,
tmpdir):
work_dir = os.path.join(tmpdir.dirname, tmpdir.basename, work_dir_name)
storage_dir = os.path.join(tmpdir.dirname, tmpdir.basename, storage_dir_name)
tmpdir.remove()
+@mock.patch('deploy.environment.time.sleep')
@mock.patch('deploy.environment.create_virtual_network')
@mock.patch('deploy.environment.get_vm_mac_addresses')
@mock.patch.object(environment.VirtualEnvironment, 'create_virtual_node')
def test_create_nodes_VirtualEnvironment(mock_create_virtual_node,
mock_get_vm_mac_addresses,
mock_create_virtual_network,
+ mock_sleep,
tmpdir):
keepalived_net_name = 'daisy3'
work_dir = os.path.join(tmpdir.dirname, tmpdir.basename, work_dir_name)
tmpdir.remove()
+@mock.patch('deploy.environment.time.sleep')
@mock.patch.object(environment.DaisyServer, 'post_deploy')
@mock.patch.object(environment.DaisyServer, 'check_openstack_installation')
@mock.patch.object(environment.DaisyServer, 'check_os_installation')
mock_copy_new_deploy_config, mock_prepare_host_and_pxe,
mock_install_virtual_nodes, mock_check_os_installation,
mock_check_openstack_installation, mock_post_deploy,
+ mock_sleep,
tmpdir):
work_dir = os.path.join(tmpdir.dirname, tmpdir.basename, work_dir_name)
storage_dir = os.path.join(tmpdir.dirname, tmpdir.basename, storage_dir_name)