vagrant-unbundled 1.8.1.2 → 1.8.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -13
- data/.travis.yml +3 -0
- data/CHANGELOG.md +167 -4
- data/LICENSE +1 -1
- data/README.md +7 -9
- data/RELEASE.md +28 -0
- data/bin/vagrant +1 -1
- data/contrib/bash/completion.sh +6 -1
- data/contrib/sudoers/linux-fedora +1 -1
- data/keys/README.md +1 -1
- data/lib/vagrant/action/builtin/box_add.rb +7 -3
- data/lib/vagrant/action/general/package.rb +47 -13
- data/lib/vagrant/box.rb +1 -1
- data/lib/vagrant/box_collection.rb +3 -4
- data/lib/vagrant/bundler.rb +29 -11
- data/lib/vagrant/machine.rb +14 -5
- data/lib/vagrant/ui.rb +1 -1
- data/lib/vagrant/util/is_port_open.rb +1 -1
- data/lib/vagrant/util/platform.rb +67 -42
- data/plugins/commands/box/command/remove.rb +1 -1
- data/plugins/commands/box/command/update.rb +10 -0
- data/plugins/commands/destroy/command.rb +1 -1
- data/plugins/commands/halt/command.rb +1 -1
- data/plugins/commands/init/command.rb +8 -2
- data/plugins/commands/login/client.rb +19 -1
- data/plugins/commands/package/command.rb +1 -1
- data/plugins/commands/plugin/command/mixin_install_opts.rb +1 -1
- data/plugins/commands/plugin/gem_helper.rb +1 -1
- data/plugins/commands/port/command.rb +1 -1
- data/plugins/commands/rdp/command.rb +1 -1
- data/plugins/commands/resume/command.rb +15 -1
- data/plugins/commands/snapshot/command/pop.rb +16 -1
- data/plugins/commands/snapshot/command/push_shared.rb +7 -9
- data/plugins/commands/snapshot/command/restore.rb +14 -1
- data/plugins/commands/ssh/command.rb +2 -1
- data/plugins/commands/ssh_config/command.rb +1 -1
- data/plugins/commands/status/command.rb +1 -1
- data/plugins/commands/suspend/command.rb +1 -1
- data/plugins/commands/up/command.rb +4 -4
- data/plugins/communicators/ssh/communicator.rb +2 -2
- data/plugins/communicators/winrm/communicator.rb +11 -11
- data/plugins/communicators/winrm/config.rb +7 -1
- data/plugins/communicators/winrm/shell.rb +41 -41
- data/plugins/guests/amazon/cap/flavor.rb +14 -0
- data/plugins/guests/amazon/guest.rb +9 -0
- data/plugins/guests/amazon/plugin.rb +20 -0
- data/plugins/guests/arch/cap/change_host_name.rb +15 -6
- data/plugins/guests/arch/cap/configure_networks.rb +33 -14
- data/plugins/guests/arch/plugin.rb +1 -1
- data/plugins/guests/atomic/cap/change_host_name.rb +16 -1
- data/plugins/guests/atomic/plugin.rb +2 -2
- data/plugins/guests/coreos/cap/change_host_name.rb +10 -4
- data/plugins/guests/coreos/cap/configure_networks.rb +49 -37
- data/plugins/guests/coreos/guest.rb +2 -0
- data/plugins/guests/coreos/plugin.rb +1 -1
- data/plugins/guests/darwin/cap/change_host_name.rb +25 -7
- data/plugins/guests/darwin/cap/choose_addressable_ip_addr.rb +7 -7
- data/plugins/guests/darwin/cap/insert_public_key.rb +19 -7
- data/plugins/guests/darwin/guest.rb +1 -1
- data/plugins/guests/darwin/plugin.rb +1 -1
- data/plugins/guests/debian/cap/change_host_name.rb +37 -84
- data/plugins/guests/debian/cap/configure_networks.rb +61 -46
- data/plugins/guests/debian/cap/nfs_client.rb +5 -4
- data/plugins/guests/debian/cap/rsync.rb +6 -3
- data/plugins/guests/debian/cap/smb.rb +6 -7
- data/plugins/guests/debian/guest.rb +2 -0
- data/plugins/guests/debian/plugin.rb +1 -1
- data/plugins/guests/fedora/cap/change_host_name.rb +18 -64
- data/plugins/guests/fedora/cap/configure_networks.rb +10 -9
- data/plugins/guests/fedora/plugin.rb +1 -1
- data/plugins/guests/freebsd/cap/change_host_name.rb +21 -3
- data/plugins/guests/freebsd/cap/configure_networks.rb +45 -30
- data/plugins/guests/freebsd/cap/halt.rb +1 -1
- data/plugins/guests/freebsd/cap/insert_public_key.rb +21 -8
- data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +10 -7
- data/plugins/guests/freebsd/cap/rsync.rb +1 -11
- data/plugins/guests/freebsd/plugin.rb +1 -1
- data/plugins/guests/funtoo/cap/configure_networks.rb +10 -6
- data/plugins/guests/gentoo/cap/configure_networks.rb +9 -8
- data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +6 -6
- data/plugins/guests/linux/cap/insert_public_key.rb +18 -8
- data/plugins/guests/linux/cap/mount_nfs.rb +16 -12
- data/plugins/guests/linux/cap/mount_smb_shared_folder.rb +2 -2
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +1 -1
- data/plugins/guests/linux/guest.rb +0 -2
- data/plugins/guests/linux/plugin.rb +1 -1
- data/plugins/guests/mint/guest.rb +0 -2
- data/plugins/guests/mint/plugin.rb +1 -1
- data/plugins/guests/netbsd/cap/configure_networks.rb +8 -8
- data/plugins/guests/nixos/cap/change_host_name.rb +11 -8
- data/plugins/guests/nixos/cap/configure_networks.rb +12 -9
- data/plugins/guests/omnios/cap/change_host_name.rb +17 -5
- data/plugins/guests/omnios/cap/mount_nfs_folder.rb +10 -4
- data/plugins/guests/omnios/cap/rsync.rb +11 -0
- data/plugins/guests/omnios/guest.rb +0 -2
- data/plugins/guests/omnios/plugin.rb +6 -1
- data/plugins/guests/openbsd/cap/configure_networks.rb +8 -6
- data/plugins/guests/photon/cap/change_host_name.rb +17 -4
- data/plugins/guests/photon/cap/configure_networks.rb +14 -26
- data/plugins/guests/photon/guest.rb +1 -1
- data/plugins/guests/photon/plugin.rb +12 -12
- data/plugins/guests/pld/cap/change_host_name.rb +21 -9
- data/plugins/guests/pld/guest.rb +0 -2
- data/plugins/guests/pld/plugin.rb +1 -1
- data/plugins/guests/redhat/cap/change_host_name.rb +30 -96
- data/plugins/guests/redhat/cap/configure_networks.rb +44 -50
- data/plugins/guests/redhat/cap/flavor.rb +3 -4
- data/plugins/guests/redhat/cap/nfs_client.rb +13 -25
- data/plugins/guests/redhat/cap/rsync.rb +6 -6
- data/plugins/guests/redhat/guest.rb +0 -2
- data/plugins/guests/redhat/plugin.rb +1 -10
- data/plugins/guests/slackware/cap/change_host_name.rb +19 -8
- data/plugins/guests/slackware/cap/configure_networks.rb +30 -14
- data/plugins/guests/slackware/guest.rb +0 -2
- data/plugins/guests/slackware/plugin.rb +1 -1
- data/plugins/guests/smartos/config.rb +3 -15
- data/plugins/guests/suse/cap/change_host_name.rb +15 -7
- data/plugins/guests/suse/cap/configure_networks.rb +31 -37
- data/plugins/guests/suse/cap/nfs_client.rb +5 -6
- data/plugins/guests/suse/cap/rsync.rb +1 -3
- data/plugins/guests/suse/guest.rb +0 -2
- data/plugins/guests/suse/plugin.rb +1 -1
- data/plugins/guests/tinycore/cap/mount_nfs.rb +46 -0
- data/plugins/guests/tinycore/plugin.rb +5 -0
- data/plugins/guests/trisquel/guest.rb +9 -0
- data/plugins/guests/trisquel/plugin.rb +15 -0
- data/plugins/guests/ubuntu/cap/change_host_name.rb +42 -41
- data/plugins/guests/ubuntu/guest.rb +0 -2
- data/plugins/guests/ubuntu/plugin.rb +1 -3
- data/plugins/guests/windows/guest_network.rb +1 -1
- data/plugins/hosts/arch/cap/nfs.rb +3 -19
- data/plugins/hosts/darwin/cap/provider_install_virtualbox.rb +4 -5
- data/plugins/hosts/darwin/cap/rdp.rb +34 -6
- data/plugins/hosts/gentoo/cap/nfs.rb +1 -1
- data/plugins/hosts/windows/cap/provider_install_virtualbox.rb +4 -5
- data/plugins/hosts/windows/cap/ps.rb +2 -2
- data/plugins/hosts/windows/cap/rdp.rb +8 -17
- data/plugins/kernel_v2/config/ssh_connect.rb +6 -0
- data/plugins/kernel_v2/config/vm.rb +3 -1
- data/plugins/providers/docker/action.rb +3 -3
- data/plugins/providers/docker/action/create.rb +1 -1
- data/plugins/providers/docker/command/exec.rb +104 -0
- data/plugins/providers/docker/config.rb +9 -1
- data/plugins/providers/docker/errors.rb +4 -0
- data/plugins/providers/docker/plugin.rb +6 -0
- data/plugins/providers/docker/provider.rb +1 -2
- data/plugins/providers/hyperv/action.rb +56 -1
- data/plugins/providers/hyperv/action/import.rb +13 -5
- data/plugins/providers/hyperv/action/snapshot_delete.rb +27 -0
- data/plugins/providers/hyperv/action/snapshot_restore.rb +23 -0
- data/plugins/providers/hyperv/action/snapshot_save.rb +27 -0
- data/plugins/providers/hyperv/cap/snapshot_list.rb +11 -0
- data/plugins/providers/hyperv/config.rb +5 -2
- data/plugins/providers/hyperv/driver.rb +18 -1
- data/plugins/providers/hyperv/plugin.rb +5 -0
- data/plugins/providers/hyperv/scripts/clone_vhd.ps1 +9 -0
- data/plugins/providers/hyperv/scripts/create_snapshot.ps1 +8 -0
- data/plugins/providers/hyperv/scripts/delete_snapshot.ps1 +8 -0
- data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +8 -2
- data/plugins/providers/hyperv/scripts/import_vm.ps1 +5 -1
- data/plugins/providers/hyperv/scripts/list_snapshots.ps1 +12 -0
- data/plugins/providers/hyperv/scripts/restore_snapshot.ps1 +8 -0
- data/plugins/providers/virtualbox/action.rb +9 -4
- data/plugins/providers/virtualbox/action/import_master.rb +81 -75
- data/plugins/providers/virtualbox/action/package.rb +1 -29
- data/plugins/providers/virtualbox/action/package_setup_files.rb +51 -0
- data/plugins/providers/virtualbox/action/package_setup_folders.rb +38 -0
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +23 -1
- data/plugins/providers/virtualbox/action/setup_package_files.rb +9 -43
- data/plugins/providers/virtualbox/driver/version_4_1.rb +104 -6
- data/plugins/providers/virtualbox/driver/version_4_2.rb +6 -5
- data/plugins/providers/virtualbox/driver/version_4_3.rb +6 -5
- data/plugins/providers/virtualbox/driver/version_5_0.rb +6 -5
- data/plugins/provisioners/ansible/cap/guest/arch/ansible_install.rb +8 -3
- data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +26 -4
- data/plugins/provisioners/ansible/cap/guest/facts.rb +24 -0
- data/plugins/provisioners/ansible/cap/guest/fedora/ansible_install.rb +16 -6
- data/plugins/provisioners/ansible/cap/guest/freebsd/ansible_install.rb +7 -2
- data/plugins/provisioners/ansible/cap/guest/pip/pip.rb +28 -0
- data/plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb +1 -1
- data/plugins/provisioners/ansible/cap/guest/redhat/ansible_install.rb +24 -7
- data/plugins/provisioners/ansible/cap/guest/suse/ansible_install.rb +6 -2
- data/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install.rb +17 -6
- data/plugins/provisioners/ansible/config/base.rb +15 -23
- data/plugins/provisioners/ansible/config/guest.rb +9 -22
- data/plugins/provisioners/ansible/config/host.rb +9 -19
- data/plugins/provisioners/ansible/errors.rb +4 -0
- data/plugins/provisioners/ansible/helpers.rb +4 -24
- data/plugins/provisioners/ansible/provisioner/base.rb +58 -10
- data/plugins/provisioners/ansible/provisioner/guest.rb +55 -22
- data/plugins/provisioners/ansible/provisioner/host.rb +50 -9
- data/plugins/provisioners/chef/cap/linux/chef_installed.rb +2 -2
- data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +3 -3
- data/plugins/provisioners/chef/cap/redhat/chef_install.rb +7 -11
- data/plugins/provisioners/chef/cap/suse/chef_install.rb +27 -0
- data/plugins/provisioners/chef/cap/windows/chef_installed.rb +1 -1
- data/plugins/provisioners/chef/command_builder.rb +1 -0
- data/plugins/provisioners/chef/config/base.rb +5 -6
- data/plugins/provisioners/chef/config/chef_solo.rb +6 -0
- data/plugins/provisioners/chef/installer.rb +2 -2
- data/plugins/provisioners/chef/omnibus.rb +1 -1
- data/plugins/provisioners/chef/plugin.rb +5 -0
- data/plugins/provisioners/chef/provisioner/base.rb +52 -56
- data/plugins/provisioners/chef/provisioner/chef_apply.rb +9 -10
- data/plugins/provisioners/chef/provisioner/chef_client.rb +1 -1
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +1 -0
- data/plugins/provisioners/docker/client.rb +22 -4
- data/plugins/provisioners/puppet/provisioner/puppet.rb +3 -3
- data/plugins/provisioners/salt/provisioner.rb +19 -24
- data/plugins/pushes/ftp/adapter.rb +18 -1
- data/plugins/pushes/heroku/locales/en.yml +1 -1
- data/plugins/synced_folders/rsync/helper.rb +1 -1
- data/templates/commands/init/Vagrantfile.erb +6 -3
- data/templates/commands/init/Vagrantfile.min.erb +1 -1
- data/templates/commands/ssh_config/config.erb +5 -1
- data/templates/guests/debian/network_dhcp.erb +2 -2
- data/templates/guests/debian/network_static.erb +2 -2
- data/templates/guests/debian/network_static6.erb +2 -2
- data/templates/guests/fedora/network_static6.erb +9 -0
- data/templates/guests/freebsd/network_dhcp.erb +2 -1
- data/templates/guests/freebsd/network_static.erb +1 -1
- data/templates/guests/slackware/network_dhcp.erb +8 -20
- data/templates/guests/slackware/network_static.erb +10 -22
- data/templates/guests/suse/network_dhcp.erb +1 -1
- data/templates/guests/suse/network_static.erb +3 -3
- data/templates/locales/en.yml +35 -18
- data/templates/locales/providers_docker.yml +8 -0
- data/templates/provisioners/chef_solo/solo.erb +7 -7
- data/test/support/isolated_environment.rb +1 -1
- data/test/unit/base.rb +9 -1
- data/test/unit/plugins/commands/box/command/update_test.rb +7 -1
- data/test/unit/plugins/commands/init/command_test.rb +86 -0
- data/test/unit/plugins/commands/login/client_test.rb +7 -0
- data/test/unit/plugins/commands/ssh_config/command_test.rb +2 -14
- data/test/unit/plugins/communicators/winrm/shell_test.rb +40 -16
- data/test/unit/plugins/guests/amazon/cap/flavor_test.rb +19 -0
- data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +38 -0
- data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +55 -0
- data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +38 -0
- data/test/unit/plugins/guests/atomic/cap/docker_test.rb +28 -0
- data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +37 -0
- data/test/unit/plugins/guests/coreos/cap/configure_networks_test.rb +59 -0
- data/test/unit/plugins/guests/coreos/cap/docker_test.rb +28 -0
- data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/darwin/cap/choose_addressable_ip_addr_test.rb +36 -0
- data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +23 -16
- data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +54 -0
- data/test/unit/plugins/guests/debian/cap/nfs_client_test.rb +30 -0
- data/test/unit/plugins/guests/debian/cap/rsync_test.rb +38 -0
- data/test/unit/plugins/guests/debian/cap/smb_test.rb +38 -0
- data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/freebsd/cap/configure_networks_test.rb +51 -0
- data/test/unit/plugins/guests/freebsd/cap/halt_test.rb +35 -0
- data/test/unit/plugins/guests/freebsd/cap/insert_public_key_test.rb +31 -0
- data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +53 -0
- data/test/unit/plugins/guests/freebsd/cap/rsync_test.rb +46 -0
- data/test/unit/plugins/guests/linux/cap/choose_addressable_ip_addr_test.rb +38 -0
- data/test/unit/plugins/guests/linux/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/linux/cap/insert_public_key_test.rb +32 -0
- data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +78 -0
- data/test/unit/plugins/guests/linux/cap/mount_shared_folder_test.rb +1 -1
- data/test/unit/plugins/guests/linux/cap/nfs_client_test.rb +29 -0
- data/test/unit/plugins/guests/linux/cap/port_test.rb +30 -0
- data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +41 -0
- data/test/unit/plugins/guests/omnios/cap/mount_nfs_folder_test.rb +47 -0
- data/test/unit/plugins/guests/omnios/cap/rsync_test.rb +29 -0
- data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +26 -18
- data/test/unit/plugins/guests/photon/cap/configure_networks_test.rb +37 -26
- data/test/unit/plugins/guests/photon/cap/docker_test.rb +17 -12
- data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +39 -0
- data/test/unit/plugins/guests/pld/cap/flavor_test.rb +21 -0
- data/test/unit/plugins/guests/pld/cap/network_scripts_dir_test.rb +21 -0
- data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +23 -51
- data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +80 -0
- data/test/unit/plugins/guests/redhat/cap/flavor_test.rb +40 -0
- data/test/unit/plugins/guests/redhat/cap/network_scripts_dir_test.rb +21 -0
- data/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb +30 -0
- data/test/unit/plugins/guests/redhat/cap/rsync_test.rb +29 -0
- data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +48 -0
- data/test/unit/plugins/guests/smartos/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/configure_networks_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/halt_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/rsync_test.rb +1 -1
- data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +40 -0
- data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +60 -0
- data/test/unit/plugins/guests/suse/cap/halt_test.rb +36 -0
- data/test/unit/plugins/guests/suse/cap/network_scripts_dir_test.rb +19 -0
- data/test/unit/plugins/guests/suse/cap/nfs_client_test.rb +31 -0
- data/test/unit/plugins/guests/suse/cap/rsync_test.rb +38 -0
- data/test/unit/plugins/guests/tinycore/cap/change_host_name_test.rb +1 -1
- data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +24 -16
- data/test/unit/plugins/guests/windows/cap/change_host_name_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/halt_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/mount_shared_folder_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/reboot_test.rb +1 -1
- data/test/unit/plugins/guests/windows/cap/rsync_test.rb +1 -1
- data/test/unit/plugins/hosts/darwin/cap/rdp_test.rb +36 -0
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +27 -1
- data/test/unit/plugins/providers/docker/action/create_test.rb +55 -0
- data/test/unit/plugins/providers/docker/command/exec_test.rb +44 -0
- data/test/unit/plugins/providers/docker/config_test.rb +7 -2
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +18 -0
- data/test/unit/plugins/provisioners/ansible/config/guest_test.rb +83 -0
- data/test/unit/plugins/provisioners/ansible/config/host_test.rb +98 -0
- data/test/unit/plugins/provisioners/ansible/config/shared.rb +107 -0
- data/test/unit/plugins/provisioners/ansible/provisioner_test.rb +82 -10
- data/test/unit/plugins/provisioners/chef/config/base_test.rb +2 -2
- data/test/unit/plugins/provisioners/chef/provisioner/base_test.rb +29 -0
- data/test/unit/plugins/pushes/atlas/push_test.rb +12 -8
- data/test/unit/plugins/pushes/ftp/adapter_test.rb +1 -1
- data/test/unit/plugins/pushes/ftp/push_test.rb +5 -4
- data/test/unit/support/isolated_environment.rb +4 -4
- data/test/unit/support/shared/base_context.rb +11 -3
- data/test/unit/templates/guests/arch/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/arch/network_static_test.rb +4 -4
- data/test/unit/templates/guests/debian/network_dhcp_test.rb +6 -6
- data/test/unit/templates/guests/debian/network_static_test.rb +6 -6
- data/test/unit/templates/guests/fedora/network_static6_test.rb +25 -0
- data/test/unit/templates/guests/freebsd/network_dhcp_test.rb +5 -2
- data/test/unit/templates/guests/freebsd/network_static_test.rb +13 -17
- data/test/unit/templates/guests/suse/network_dhcp_test.rb +2 -2
- data/test/unit/templates/guests/suse/network_static_test.rb +4 -4
- data/test/unit/vagrant/action/builtin/box_add_test.rb +33 -31
- data/test/unit/vagrant/action/builtin/lock_test.rb +5 -2
- data/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +6 -2
- data/test/unit/vagrant/action/builtin/synced_folder_cleanup_test.rb +5 -1
- data/test/unit/vagrant/action/builtin/synced_folders_test.rb +5 -1
- data/test/unit/vagrant/box_collection_test.rb +19 -7
- data/test/unit/vagrant/box_test.rb +13 -2
- data/test/unit/vagrant/config_test.rb +1 -1
- data/test/unit/vagrant/environment_test.rb +16 -12
- data/test/unit/vagrant/machine_index_test.rb +5 -1
- data/test/unit/vagrant/machine_test.rb +5 -1
- data/test/unit/vagrant/plugin/manager_test.rb +1 -5
- data/test/unit/vagrant/plugin/state_file_test.rb +1 -5
- data/test/unit/vagrant/util/platform_test.rb +5 -0
- data/test/unit/vagrant/util/safe_chdir_test.rb +11 -5
- data/test/unit/vagrant/vagrantfile_test.rb +5 -1
- data/vagrant.gemspec +8 -3
- data/version.txt +1 -1
- metadata +3657 -12
- data/CONTRIBUTING.md +0 -41
- data/test/unit/plugins/guests/support/shared/debian_like_host_name_examples.rb +0 -106
- data/test/unit/plugins/guests/support/shared/redhat_like_host_name_examples.rb +0 -252
- data/test/unit/plugins/provisioners/ansible/config_test.rb +0 -224
@@ -153,6 +153,14 @@ en:
|
|
153
153
|
Stderr: %{stderr}
|
154
154
|
|
155
155
|
Stdout: %{stdout}
|
156
|
+
exec_command_required: |-
|
157
|
+
The "docker-exec" command requires a command to execute. This command
|
158
|
+
must be specified after a "--" in the command line. This is used to
|
159
|
+
separate machine name and options from the actual command to execute.
|
160
|
+
An example is show below:
|
161
|
+
|
162
|
+
$ vagrant docker-exec -t nginx -- bash
|
163
|
+
|
156
164
|
host_vm_communicator_not_ready: |-
|
157
165
|
The Docker provider was able to bring up the host VM successfully
|
158
166
|
but the host VM is still reporting that SSH is unavailable. This
|
@@ -4,15 +4,15 @@ node_name "<%= node_name %>"
|
|
4
4
|
file_cache_path "<%= file_cache_path %>"
|
5
5
|
file_backup_path "<%= file_backup_path %>"
|
6
6
|
cookbook_path <%= cookbooks_path.inspect %>
|
7
|
-
<% if roles_path
|
7
|
+
<% if roles_path && !roles_path.empty? -%>
|
8
8
|
role_path <%= roles_path.size == 1 ? roles_path.first.inspect : roles_path.inspect %>
|
9
|
-
<% end
|
9
|
+
<% end -%>
|
10
10
|
log_level <%= log_level.inspect %>
|
11
11
|
verbose_logging <%= verbose_logging.inspect %>
|
12
12
|
|
13
13
|
encrypted_data_bag_secret <%= encrypted_data_bag_secret.inspect %>
|
14
14
|
|
15
|
-
<% if data_bags_path -%>
|
15
|
+
<% if data_bags_path && !data_bags_path.empty? -%>
|
16
16
|
data_bag_path <%= data_bags_path.size == 1 ? data_bags_path.first.inspect : data_bags_path.inspect %>
|
17
17
|
<% end %>
|
18
18
|
|
@@ -20,18 +20,18 @@ data_bag_path <%= data_bags_path.size == 1 ? data_bags_path.first.inspect : data
|
|
20
20
|
recipe_url "<%= recipe_url %>"
|
21
21
|
<% end -%>
|
22
22
|
|
23
|
-
<% if environments_path
|
23
|
+
<% if environments_path && !environments_path.empty? -%>
|
24
24
|
environment_path <%= environments_path.inspect %>
|
25
25
|
<% end -%>
|
26
26
|
|
27
|
-
<% if environment
|
27
|
+
<% if environment -%>
|
28
28
|
environment "<%= environment %>"
|
29
29
|
<% end -%>
|
30
30
|
|
31
31
|
<% if local_mode -%>
|
32
32
|
local_mode true
|
33
33
|
<% end -%>
|
34
|
-
<% if nodes_path -%>
|
34
|
+
<% if nodes_path && !nodes_path.empty? -%>
|
35
35
|
node_path <%= nodes_path.inspect %>
|
36
36
|
<% end -%>
|
37
37
|
|
@@ -43,7 +43,7 @@ https_proxy_user <%= https_proxy_user.inspect %>
|
|
43
43
|
https_proxy_pass <%= https_proxy_pass.inspect %>
|
44
44
|
no_proxy <%= no_proxy.inspect %>
|
45
45
|
|
46
|
-
<% if formatter
|
46
|
+
<% if formatter -%>
|
47
47
|
add_formatter "<%= formatter %>"
|
48
48
|
<% end %>
|
49
49
|
|
@@ -28,7 +28,7 @@ class IsolatedEnvironment
|
|
28
28
|
@logger = Log4r::Logger.new("test::isolated_environment")
|
29
29
|
|
30
30
|
# Create a temporary directory for our work
|
31
|
-
@tempdir = Vagrant::Util::Platform.fs_real_path(Dir.mktmpdir("vagrant"))
|
31
|
+
@tempdir = Vagrant::Util::Platform.fs_real_path(Dir.mktmpdir("vagrant-iso-env"))
|
32
32
|
@logger.info("Initialize isolated environment: #{@tempdir}")
|
33
33
|
|
34
34
|
# Setup the home and working directories
|
data/test/unit/base.rb
CHANGED
@@ -27,6 +27,10 @@ require "unit/support/shared/virtualbox_context"
|
|
27
27
|
$stdout.sync = true
|
28
28
|
$stderr.sync = true
|
29
29
|
|
30
|
+
# Create a temporary directory where test vagrant will run. The reason we save
|
31
|
+
# this to a constant is so we can clean it up later.
|
32
|
+
VAGRANT_TEST_CWD = Dir.mktmpdir("vagrant-test-cwd")
|
33
|
+
|
30
34
|
# Configure RSpec
|
31
35
|
RSpec.configure do |c|
|
32
36
|
c.treat_symbols_as_metadata_keys_with_true_values = true
|
@@ -36,11 +40,15 @@ RSpec.configure do |c|
|
|
36
40
|
else
|
37
41
|
c.filter_run_excluding :windows
|
38
42
|
end
|
43
|
+
|
44
|
+
c.after(:suite) do
|
45
|
+
FileUtils.rm_rf(VAGRANT_TEST_CWD)
|
46
|
+
end
|
39
47
|
end
|
40
48
|
|
41
49
|
# Configure VAGRANT_CWD so that the tests never find an actual
|
42
50
|
# Vagrantfile anywhere, or at least this minimizes those chances.
|
43
|
-
ENV["VAGRANT_CWD"] =
|
51
|
+
ENV["VAGRANT_CWD"] = VAGRANT_TEST_CWD
|
44
52
|
|
45
53
|
# Set the dummy provider to the default for tests
|
46
54
|
ENV["VAGRANT_DEFAULT_PROVIDER"] = "dummy"
|
@@ -35,7 +35,9 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
35
35
|
context "updating specific box" do
|
36
36
|
let(:argv) { ["--box", "foo"] }
|
37
37
|
|
38
|
-
let(:
|
38
|
+
let(:scratch) { Dir.mktmpdir("vagrant-test-command-box-update-execute") }
|
39
|
+
|
40
|
+
let(:metadata_url) { Pathname.new(scratch).join("metadata.json") }
|
39
41
|
|
40
42
|
before do
|
41
43
|
metadata_url.open("w") do |f|
|
@@ -46,6 +48,10 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
46
48
|
"foo", "1.0", :virtualbox, metadata_url: metadata_url.to_s)
|
47
49
|
end
|
48
50
|
|
51
|
+
after do
|
52
|
+
FileUtils.rm_rf(scratch)
|
53
|
+
end
|
54
|
+
|
49
55
|
it "doesn't update if they're up to date" do
|
50
56
|
called = false
|
51
57
|
allow(action_runner).to receive(:run) do |callable, opts|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require_relative "../../../base"
|
2
|
+
require_relative "../../../../../plugins/commands/init/command"
|
3
|
+
|
4
|
+
describe VagrantPlugins::CommandInit::Command do
|
5
|
+
include_context "unit"
|
6
|
+
include_context "command plugin helpers"
|
7
|
+
|
8
|
+
let(:iso_env) do
|
9
|
+
isolated_environment
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:env) do
|
13
|
+
iso_env.create_vagrant_env
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:vagrantfile_path) { File.join(env.cwd, "Vagrantfile") }
|
17
|
+
|
18
|
+
before do
|
19
|
+
Vagrant.plugin("2").manager.stub(commands: {})
|
20
|
+
end
|
21
|
+
|
22
|
+
after do
|
23
|
+
iso_env.close
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#execute" do
|
27
|
+
it "creates a Vagrantfile with no args" do
|
28
|
+
described_class.new([], env).execute
|
29
|
+
contents = File.read(vagrantfile_path)
|
30
|
+
expect(contents).to match(/config.vm.box = "base"/)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "creates a minimal Vagrantfile" do
|
34
|
+
described_class.new(["-m"], env).execute
|
35
|
+
contents = File.read(vagrantfile_path)
|
36
|
+
expect(contents).to_not match(/#/)
|
37
|
+
expect(contents).to_not match(/provision/)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "does not overwrite an existing Vagrantfile" do
|
41
|
+
# Create an existing Vagrantfile
|
42
|
+
File.open(File.join(env.cwd, "Vagrantfile"), "w+") { |f| f.write("") }
|
43
|
+
|
44
|
+
expect {
|
45
|
+
described_class.new([], env).execute
|
46
|
+
}.to raise_error(Vagrant::Errors::VagrantfileExistsError)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "overwrites an existing Vagrantfile with force" do
|
50
|
+
# Create an existing Vagrantfile
|
51
|
+
File.open(File.join(env.cwd, "Vagrantfile"), "w+") { |f| f.write("") }
|
52
|
+
|
53
|
+
expect {
|
54
|
+
described_class.new(["-f"], env).execute
|
55
|
+
}.to_not raise_error
|
56
|
+
|
57
|
+
contents = File.read(vagrantfile_path)
|
58
|
+
expect(contents).to match(/config.vm.box = "base"/)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "creates a Vagrantfile with a box" do
|
62
|
+
described_class.new(["hashicorp/precise64"], env).execute
|
63
|
+
contents = File.read(vagrantfile_path)
|
64
|
+
expect(contents).to match(/config.vm.box = "hashicorp\/precise64"/)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "creates a Vagrantfile with a box and box_url" do
|
68
|
+
described_class.new(["hashicorp/precise64", "http://mybox.com"], env).execute
|
69
|
+
contents = File.read(vagrantfile_path)
|
70
|
+
expect(contents).to match(/config.vm.box = "hashicorp\/precise64"/)
|
71
|
+
expect(contents).to match(/config.vm.box_url = "http:\/\/mybox.com"/)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "creates a Vagrantfile with a box and box version" do
|
75
|
+
described_class.new(["--box-version", "1.2.3", "hashicorp/precise64"], env).execute
|
76
|
+
contents = File.read(vagrantfile_path)
|
77
|
+
expect(contents).to match(/config.vm.box = "hashicorp\/precise64"/)
|
78
|
+
expect(contents).to match(/config.vm.box_version = "1.2.3"/)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "creates a Vagrantfile at a custom path" do
|
82
|
+
described_class.new(["--output", "vf.rb"], env).execute
|
83
|
+
expect(File.exist?(File.join(env.cwd, "vf.rb"))).to be(true)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -112,6 +112,13 @@ describe VagrantPlugins::LoginCommand::Client do
|
|
112
112
|
expect(subject.token).to eq("ABCD1234")
|
113
113
|
end
|
114
114
|
|
115
|
+
it "prints a warning if the envvar and stored file are both present" do
|
116
|
+
stub_env("ATLAS_TOKEN" => "ABCD1234")
|
117
|
+
subject.store_token("EFGH5678")
|
118
|
+
expect(env.ui).to receive(:warn).with(/detected both/)
|
119
|
+
subject.token
|
120
|
+
end
|
121
|
+
|
115
122
|
it "returns nil if there's no token set" do
|
116
123
|
expect(subject.token).to be(nil)
|
117
124
|
end
|
@@ -92,8 +92,8 @@ Host #{machine.name}
|
|
92
92
|
|
93
93
|
subject.execute
|
94
94
|
|
95
|
-
expect(output).to include(
|
96
|
-
expect(output).to include(
|
95
|
+
expect(output).to include("IdentityFile foo")
|
96
|
+
expect(output).to include("IdentityFile bar")
|
97
97
|
end
|
98
98
|
|
99
99
|
it "puts quotes around an identityfile path if it has a space" do
|
@@ -107,17 +107,5 @@ Host #{machine.name}
|
|
107
107
|
|
108
108
|
expect(output).to include('IdentityFile "with a space"')
|
109
109
|
end
|
110
|
-
|
111
|
-
it "escapes special characters" do
|
112
|
-
allow(machine).to receive(:ssh_info) { ssh_info.merge(private_key_path: ['/private/tmp/test of "vagrant" plugin/']) }
|
113
|
-
output = ""
|
114
|
-
allow(subject).to receive(:safe_puts) do |data|
|
115
|
-
output += data if data
|
116
|
-
end
|
117
|
-
|
118
|
-
subject.execute
|
119
|
-
|
120
|
-
expect(output).to include('"/private/tmp/test of \"vagrant\" plugin/"')
|
121
|
-
end
|
122
110
|
end
|
123
111
|
end
|
@@ -6,7 +6,8 @@ require Vagrant.source_root.join("plugins/communicators/winrm/config")
|
|
6
6
|
describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
7
7
|
include_context "unit"
|
8
8
|
|
9
|
-
let(:session) { double("winrm_session") }
|
9
|
+
let(:session) { double("winrm_session", create_executor: executor) }
|
10
|
+
let(:executor) { double("command_executor") }
|
10
11
|
let(:port) { config.transport == :ssl ? 5986 : 5985 }
|
11
12
|
let(:config) {
|
12
13
|
VagrantPlugins::CommunicatorWinRM::Config.new.tap do |c|
|
@@ -14,6 +15,9 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|
14
15
|
c.password = 'password'
|
15
16
|
c.max_tries = 3
|
16
17
|
c.retry_delay = 0
|
18
|
+
c.basic_auth_only = false
|
19
|
+
c.retry_delay = 1
|
20
|
+
c.max_tries = 2
|
17
21
|
c.finalize!
|
18
22
|
end
|
19
23
|
}
|
@@ -26,23 +30,12 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|
26
30
|
|
27
31
|
describe ".powershell" do
|
28
32
|
it "should call winrm powershell" do
|
29
|
-
expect(
|
33
|
+
expect(executor).to receive(:run_powershell_script).with(/^dir.+/).and_return({ exitcode: 0 })
|
30
34
|
expect(subject.powershell("dir")[:exitcode]).to eq(0)
|
31
35
|
end
|
32
36
|
|
33
|
-
it "should retry when a WinRMAuthorizationError is received" do
|
34
|
-
expect(session).to receive(:powershell).with(/^dir.+/).exactly(3).times.and_raise(
|
35
|
-
# Note: The initialize for WinRMAuthorizationError may require a status_code as
|
36
|
-
# the second argument in a future WinRM release. Currently it doesn't track the
|
37
|
-
# status code.
|
38
|
-
WinRM::WinRMAuthorizationError.new("Oh no!! Unauthrorized")
|
39
|
-
)
|
40
|
-
expect { subject.powershell("dir") }.to raise_error(
|
41
|
-
VagrantPlugins::CommunicatorWinRM::Errors::AuthenticationFailed)
|
42
|
-
end
|
43
|
-
|
44
37
|
it "should raise an execution error when an exception occurs" do
|
45
|
-
expect(
|
38
|
+
expect(executor).to receive(:run_powershell_script).with(/^dir.+/).and_raise(
|
46
39
|
StandardError.new("Oh no! a 500 SOAP error!"))
|
47
40
|
expect { subject.powershell("dir") }.to raise_error(
|
48
41
|
VagrantPlugins::CommunicatorWinRM::Errors::ExecutionError)
|
@@ -51,11 +44,29 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|
51
44
|
|
52
45
|
describe ".cmd" do
|
53
46
|
it "should call winrm cmd" do
|
54
|
-
expect(
|
47
|
+
expect(executor).to receive(:run_cmd).with("dir").and_return({ exitcode: 0 })
|
55
48
|
expect(subject.cmd("dir")[:exitcode]).to eq(0)
|
56
49
|
end
|
57
50
|
end
|
58
51
|
|
52
|
+
describe ".wql" do
|
53
|
+
it "should call winrm wql" do
|
54
|
+
expect(session).to receive(:run_wql).with("select * from Win32_OperatingSystem").and_return({ exitcode: 0 })
|
55
|
+
expect(subject.wql("select * from Win32_OperatingSystem")[:exitcode]).to eq(0)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should retry when a WinRMAuthorizationError is received" do
|
59
|
+
expect(session).to receive(:run_wql).with("select * from Win32_OperatingSystem").exactly(2).times.and_raise(
|
60
|
+
# Note: The initialize for WinRMAuthorizationError may require a status_code as
|
61
|
+
# the second argument in a future WinRM release. Currently it doesn't track the
|
62
|
+
# status code.
|
63
|
+
WinRM::WinRMAuthorizationError.new("Oh no!! Unauthrorized")
|
64
|
+
)
|
65
|
+
expect { subject.wql("select * from Win32_OperatingSystem") }.to raise_error(
|
66
|
+
VagrantPlugins::CommunicatorWinRM::Errors::AuthenticationFailed)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
59
70
|
describe ".endpoint" do
|
60
71
|
context 'when transport is :ssl' do
|
61
72
|
let(:config) {
|
@@ -69,7 +80,19 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|
69
80
|
end
|
70
81
|
end
|
71
82
|
|
83
|
+
context "when transport is :negotiate" do
|
84
|
+
it "should create winrm endpoint address using http" do
|
85
|
+
expect(subject.send(:endpoint)).to eq("http://localhost:5985/wsman")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
72
89
|
context "when transport is :plaintext" do
|
90
|
+
let(:config) {
|
91
|
+
VagrantPlugins::CommunicatorWinRM::Config.new.tap do |c|
|
92
|
+
c.transport = :plaintext
|
93
|
+
c.finalize!
|
94
|
+
end
|
95
|
+
}
|
73
96
|
it "should create winrm endpoint address using http" do
|
74
97
|
expect(subject.send(:endpoint)).to eq("http://localhost:5985/wsman")
|
75
98
|
end
|
@@ -80,7 +103,8 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|
80
103
|
it "should create endpoint options" do
|
81
104
|
expect(subject.send(:endpoint_options)).to eq(
|
82
105
|
{ user: "username", pass: "password", host: "localhost", port: 5985,
|
83
|
-
basic_auth_only:
|
106
|
+
basic_auth_only: false, no_ssl_peer_verification: false,
|
107
|
+
retry_delay: 1, retry_limit: 2 })
|
84
108
|
end
|
85
109
|
end
|
86
110
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestAmazon::Cap::Flavor" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestAmazon::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:amazon]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
|
12
|
+
describe ".flavor" do
|
13
|
+
let(:cap) { caps.get(:flavor) }
|
14
|
+
|
15
|
+
it "returns rhel" do
|
16
|
+
expect(cap.flavor(machine)).to be(:rhel)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestArch::Cap::ChangeHostName" do
|
4
|
+
let(:described_class) do
|
5
|
+
VagrantPlugins::GuestArch::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:arch]
|
8
|
+
.get(:change_host_name)
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:machine) { double("machine") }
|
12
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
13
|
+
|
14
|
+
before do
|
15
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
16
|
+
end
|
17
|
+
|
18
|
+
after do
|
19
|
+
comm.verify_expectations!
|
20
|
+
end
|
21
|
+
|
22
|
+
describe ".change_host_name" do
|
23
|
+
let(:hostname) { "banana-rama.example.com" }
|
24
|
+
|
25
|
+
it "sets the hostname" do
|
26
|
+
comm.stub_command("hostname | grep -w '#{hostname}'", exit_code: 1)
|
27
|
+
|
28
|
+
described_class.change_host_name(machine, hostname)
|
29
|
+
expect(comm.received_commands[1]).to match(/hostnamectl set-hostname '#{hostname}'/)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "does not change the hostname if already set" do
|
33
|
+
comm.stub_command("hostname | grep -w '#{hostname}'", exit_code: 0)
|
34
|
+
described_class.change_host_name(machine, hostname)
|
35
|
+
expect(comm.received_commands.size).to eq(1)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestArch::Cap::ConfigureNetworks" do
|
4
|
+
let(:described_class) do
|
5
|
+
VagrantPlugins::GuestArch::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:arch]
|
8
|
+
.get(:configure_networks)
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:machine) { double("machine") }
|
12
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
13
|
+
|
14
|
+
before do
|
15
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
16
|
+
comm.stub_command("ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://'",
|
17
|
+
stdout: "eth1\neth2")
|
18
|
+
end
|
19
|
+
|
20
|
+
after do
|
21
|
+
comm.verify_expectations!
|
22
|
+
end
|
23
|
+
|
24
|
+
describe ".configure_networks" do
|
25
|
+
let(:network_1) do
|
26
|
+
{
|
27
|
+
interface: 0,
|
28
|
+
type: "dhcp",
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
let(:network_2) do
|
33
|
+
{
|
34
|
+
interface: 1,
|
35
|
+
type: "static",
|
36
|
+
ip: "33.33.33.10",
|
37
|
+
netmask: "255.255.0.0",
|
38
|
+
gateway: "33.33.0.1",
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
it "creates and starts the networks" do
|
43
|
+
described_class.configure_networks(machine, [network_1, network_2])
|
44
|
+
expect(comm.received_commands[1]).to match(/mv (.+) '\/etc\/netctl\/eth1'/)
|
45
|
+
expect(comm.received_commands[1]).to match(/ip link set 'eth1' down/)
|
46
|
+
expect(comm.received_commands[1]).to match(/netctl restart 'eth1'/)
|
47
|
+
expect(comm.received_commands[1]).to match(/netctl enable 'eth1'/)
|
48
|
+
|
49
|
+
expect(comm.received_commands[1]).to match(/mv (.+) '\/etc\/netctl\/eth2'/)
|
50
|
+
expect(comm.received_commands[1]).to match(/ip link set 'eth2' down/)
|
51
|
+
expect(comm.received_commands[1]).to match(/netctl restart 'eth2'/)
|
52
|
+
expect(comm.received_commands[1]).to match(/netctl enable 'eth2'/)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|