vagrant-unbundled 1.9.7.1 → 1.9.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/Gemfile.lock +10 -6
- data/contrib/bash/completion.sh +1 -1
- data/contrib/sudoers/linux-ubuntu +3 -4
- data/lib/vagrant/errors.rb +8 -0
- data/lib/vagrant/machine.rb +2 -0
- data/lib/vagrant/util/platform.rb +1 -1
- data/lib/vagrant/util/powershell.rb +42 -13
- data/lib/vagrant/util/safe_exec.rb +13 -2
- data/lib/vagrant/util/ssh.rb +11 -1
- data/plugins/commands/box/command/update.rb +12 -7
- data/plugins/commands/login/client.rb +15 -6
- data/plugins/commands/login/command.rb +13 -3
- data/plugins/commands/up/command.rb +9 -0
- data/plugins/commands/validate/command.rb +4 -4
- data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/freebsd/cap/configure_networks.rb +1 -1
- data/plugins/guests/freebsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/linux/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/netbsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/openbsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/windows/cap/public_key.rb +21 -45
- data/plugins/kernel_v2/config/ssh_connect.rb +3 -0
- data/plugins/providers/docker/config.rb +4 -0
- data/plugins/providers/docker/driver/compose.rb +11 -4
- data/plugins/providers/hyperv/action/wait_for_ip_address.rb +15 -11
- data/plugins/providers/hyperv/scripts/get_network_config.ps1 +24 -9
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +18 -0
- data/plugins/provisioners/ansible/provisioner/host.rb +1 -1
- data/plugins/provisioners/chef/cap/debian/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/freebsd/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/omnios/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/redhat/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/suse/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/windows/chef_install.rb +2 -2
- data/plugins/provisioners/chef/config/base.rb +17 -0
- data/plugins/provisioners/chef/config/chef_zero.rb +7 -0
- data/plugins/provisioners/chef/installer.rb +8 -7
- data/plugins/provisioners/chef/omnibus.rb +4 -6
- data/plugins/provisioners/chef/provisioner/base.rb +1 -0
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +2 -1
- data/plugins/provisioners/file/provisioner.rb +18 -2
- data/plugins/provisioners/puppet/provisioner/puppet.rb +0 -2
- data/plugins/provisioners/salt/bootstrap-salt.sh +9 -5
- data/plugins/provisioners/shell/provisioner.rb +1 -1
- data/plugins/synced_folders/rsync/command/rsync_auto.rb +6 -1
- data/plugins/synced_folders/rsync/helper.rb +10 -0
- data/templates/locales/en.yml +27 -1
- data/templates/locales/providers_docker.yml +2 -0
- data/test/unit/base.rb +1 -3
- data/test/unit/plugins/commands/box/command/add_test.rb +3 -3
- data/test/unit/plugins/commands/box/command/remove_test.rb +6 -6
- data/test/unit/plugins/commands/box/command/repackage_test.rb +2 -4
- data/test/unit/plugins/commands/box/command/update_test.rb +36 -14
- data/test/unit/plugins/commands/init/command_test.rb +1 -1
- data/test/unit/plugins/commands/list-commands/command_test.rb +2 -2
- data/test/unit/plugins/commands/login/client_test.rb +5 -1
- data/test/unit/plugins/commands/package/command_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/expunge_plugins_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/install_gem_test.rb +3 -3
- data/test/unit/plugins/commands/plugin/action/plugin_exists_check_test.rb +3 -3
- data/test/unit/plugins/commands/plugin/action/uninstall_plugin_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/update_gems_test.rb +2 -2
- data/test/unit/plugins/commands/port/command_test.rb +3 -3
- data/test/unit/plugins/commands/push/command_test.rb +1 -1
- data/test/unit/plugins/commands/snapshot/command/list_test.rb +2 -3
- data/test/unit/plugins/commands/ssh_config/command_test.rb +1 -1
- data/test/unit/plugins/commands/up/command_test.rb +69 -2
- data/test/unit/plugins/commands/validate/command_test.rb +47 -1
- data/test/unit/plugins/communicators/ssh/communicator_test.rb +5 -5
- data/test/unit/plugins/communicators/winrm/communicator_test.rb +6 -6
- data/test/unit/plugins/communicators/winrm/helper_test.rb +24 -23
- data/test/unit/plugins/communicators/winssh/communicator_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/freebsd/cap/configure_networks_test.rb +1 -1
- data/test/unit/plugins/guests/freebsd/cap/shell_expand_guest_path_test.rb +44 -0
- data/test/unit/plugins/guests/linux/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/netbsd/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/omnios/cap/mount_nfs_folder_test.rb +1 -3
- data/test/unit/plugins/guests/openbsd/cap/shell_expand_guest_path_test.rb +43 -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 +2 -2
- data/test/unit/plugins/guests/smartos/cap/halt_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/insert_public_key_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/rsync_test.rb +2 -2
- data/test/unit/plugins/guests/windows/cap/insert_public_key_test.rb +2 -2
- data/test/unit/plugins/guests/windows/cap/remove_public_key_test.rb +4 -3
- data/test/unit/plugins/guests/windows/config_test.rb +1 -1
- data/test/unit/plugins/guests/windows/guest_network_test.rb +2 -2
- data/test/unit/plugins/hosts/linux/cap/nfs_test.rb +2 -0
- data/test/unit/plugins/kernel_v2/config/push_test.rb +1 -1
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +7 -7
- data/test/unit/plugins/providers/docker/action/create_test.rb +1 -1
- data/test/unit/plugins/providers/docker/command/exec_test.rb +1 -1
- data/test/unit/plugins/providers/docker/config_test.rb +23 -4
- data/test/unit/plugins/providers/docker/driver_compose_test.rb +60 -30
- data/test/unit/plugins/providers/docker/driver_test.rb +31 -31
- data/test/unit/plugins/providers/docker/synced_folder_test.rb +3 -3
- data/test/unit/plugins/providers/hyperv/provider_test.rb +19 -19
- data/test/unit/plugins/providers/virtualbox/action/network_fix_ipv6_test.rb +2 -2
- data/test/unit/plugins/providers/virtualbox/action/network_test.rb +1 -1
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +34 -8
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_valid_ids_test.rb +3 -3
- data/test/unit/plugins/providers/virtualbox/cap_test.rb +2 -2
- data/test/unit/plugins/providers/virtualbox/config_test.rb +6 -6
- data/test/unit/plugins/providers/virtualbox/synced_folder_test.rb +6 -8
- data/test/unit/plugins/provisioners/ansible/config/guest_test.rb +1 -1
- data/test/unit/plugins/provisioners/ansible/config/host_test.rb +4 -4
- data/test/unit/plugins/provisioners/ansible/config/shared.rb +2 -2
- data/test/unit/plugins/provisioners/ansible/provisioner_test.rb +165 -157
- data/test/unit/plugins/provisioners/chef/command_builder_test.rb +2 -2
- data/test/unit/plugins/provisioners/chef/config/base_test.rb +13 -0
- data/test/unit/plugins/provisioners/chef/config/chef_zero_test.rb +11 -0
- data/test/unit/plugins/provisioners/chef/omnibus_test.rb +17 -7
- data/test/unit/plugins/provisioners/docker/config_test.rb +2 -1
- data/test/unit/plugins/provisioners/docker/provisioner_test.rb +13 -13
- data/test/unit/plugins/provisioners/file/provisioner_test.rb +32 -14
- data/test/unit/plugins/provisioners/puppet/provisioner/puppet_test.rb +51 -0
- data/test/unit/plugins/provisioners/salt/provisioner_test.rb +5 -5
- data/test/unit/plugins/provisioners/shell/provisioner_test.rb +35 -4
- data/test/unit/plugins/pushes/ftp/adapter_test.rb +1 -0
- data/test/unit/plugins/synced_folders/nfs/action_cleanup_test.rb +1 -1
- data/test/unit/plugins/synced_folders/nfs/config_test.rb +1 -1
- data/test/unit/plugins/synced_folders/rsync/command/rsync_auto_test.rb +44 -12
- data/test/unit/plugins/synced_folders/rsync/command/rsync_test.rb +5 -5
- data/test/unit/plugins/synced_folders/rsync/helper_test.rb +47 -29
- data/test/unit/plugins/synced_folders/rsync/synced_folder_test.rb +5 -5
- data/test/unit/vagrant/action/builtin/box_add_test.rb +27 -27
- data/test/unit/vagrant/action/builtin/box_check_outdated_test.rb +10 -10
- data/test/unit/vagrant/action/builtin/box_remove_test.rb +15 -15
- data/test/unit/vagrant/action/builtin/confirm_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +2 -2
- data/test/unit/vagrant/action/builtin/handle_box_test.rb +8 -8
- data/test/unit/vagrant/action/builtin/handle_forwarded_port_collisions_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/is_env_set_test.rb +2 -2
- data/test/unit/vagrant/action/builtin/is_state_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/provision_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/provisioner_cleanup_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/synced_folder_cleanup_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/synced_folders_test.rb +3 -3
- data/test/unit/vagrant/batch_action_test.rb +2 -2
- data/test/unit/vagrant/box_collection_test.rb +1 -1
- data/test/unit/vagrant/box_test.rb +6 -6
- data/test/unit/vagrant/capability_host_test.rb +3 -3
- data/test/unit/vagrant/cli_test.rb +3 -3
- data/test/unit/vagrant/environment_test.rb +21 -20
- data/test/unit/vagrant/guest_test.rb +7 -7
- data/test/unit/vagrant/machine_index_test.rb +4 -4
- data/test/unit/vagrant/machine_test.rb +28 -17
- data/test/unit/vagrant/plugin/manager_test.rb +12 -12
- data/test/unit/vagrant/plugin/state_file_test.rb +2 -2
- data/test/unit/vagrant/plugin/v1/command_test.rb +9 -8
- data/test/unit/vagrant/plugin/v2/command_test.rb +54 -43
- data/test/unit/vagrant/plugin/v2/plugin_test.rb +4 -3
- data/test/unit/vagrant/plugin/v2/provider_test.rb +3 -3
- data/test/unit/vagrant/shared_helpers_test.rb +6 -6
- data/test/unit/vagrant/ui_test.rb +21 -21
- data/test/unit/vagrant/util/downloader_test.rb +7 -7
- data/test/unit/vagrant/util/ssh_test.rb +41 -5
- data/test/unit/vagrant/util/subprocess_test.rb +7 -7
- data/test/unit/vagrant_test.rb +9 -9
- data/vagrant.gemspec +3 -2
- data/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-spec-af86757912f7/vagrant-spec.gemspec +1 -1
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.gitignore +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.rspec +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.travis.yml +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/CONTRIBUTORS.md +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile.lock +44 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Guardfile +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/README.md +134 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Rakefile +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/fake_ftp.gemspec +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp.rb +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/file.rb +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/server.rb +340 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/version.rb +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/invisible_bike.jpg +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/text_file.txt +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/functional/server_spec.rb +468 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/integration/server_spec.rb +81 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/file_spec.rb +102 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/server_spec.rb +76 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/spec_helper.rb +18 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.gitignore +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.rubocop.yml +57 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.travis.yml +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/CONTRIBUTING.rdoc +36 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Gemfile +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/History.rdoc +2247 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Rakefile +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/appveyor.yml +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/console +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/setup +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake.rb +70 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb +785 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/clean.rb +77 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cpu_counter.rb +106 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/dsl_definition.rb +194 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/string.rb +175 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_list.rb +434 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils.rb +136 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/linked_list.rb +111 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/multi_task.rb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/name_space.rb +37 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/packagetask.rb +210 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rule_recursion_overflow_error.rb +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb +390 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_arguments.rb +108 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_manager.rb +303 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/tasklib.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/testtask.rb +222 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_pool.rb +162 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/version.rb +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/win32.rb +50 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/rake.gemspec +39 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.gitignore +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.rspec +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.travis.yml +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Changelog.md +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Gemfile +26 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/LICENSE.txt +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/README.md +72 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Rakefile +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/cucumber.yml +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/its.feature +125 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/step_definitions/additional_cli_steps.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/support/env.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its.rb +149 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its/version.rb +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/rspec-its.gemspec +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/script/test_all +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/rspec/its_spec.rb +237 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/spec_helper.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/specifications/fake_ftp-0.1.1.gemspec +20 -0
- data/vendor/bundle/ruby/2.4.0/specifications/rake-12.0.0.gemspec +43 -0
- data/vendor/bundle/ruby/2.4.0/specifications/rspec-its-1.2.0.gemspec +47 -0
- data/version.txt +1 -1
- metadata +137 -7
- data/2.14.0 +0 -5
@@ -27,7 +27,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
27
27
|
subject { described_class.new(argv, iso_env) }
|
28
28
|
|
29
29
|
before do
|
30
|
-
iso_env.
|
30
|
+
allow(iso_env).to receive(:action_runner).and_return(action_runner)
|
31
31
|
machine.config.vm.box = "foo"
|
32
32
|
end
|
33
33
|
|
@@ -64,7 +64,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
64
64
|
|
65
65
|
subject.execute
|
66
66
|
|
67
|
-
expect(called).to
|
67
|
+
expect(called).to be(false)
|
68
68
|
end
|
69
69
|
|
70
70
|
it "does update if there is an update" do
|
@@ -94,6 +94,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
94
94
|
allow(action_runner).to receive(:run) do |action, opts|
|
95
95
|
if opts[:box_provider]
|
96
96
|
action_called = true
|
97
|
+
expect(opts[:box_force]).to eq(nil)
|
97
98
|
expect(opts[:box_url]).to eq(metadata_url.to_s)
|
98
99
|
expect(opts[:box_provider]).to eq("virtualbox")
|
99
100
|
expect(opts[:box_version]).to eq("1.1")
|
@@ -108,7 +109,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
108
109
|
|
109
110
|
subject.execute
|
110
111
|
|
111
|
-
expect(action_called).to
|
112
|
+
expect(action_called).to be(true)
|
112
113
|
end
|
113
114
|
|
114
115
|
it "raises an error if there are multiple providers" do
|
@@ -162,7 +163,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
162
163
|
|
163
164
|
subject.execute
|
164
165
|
|
165
|
-
expect(action_called).to
|
166
|
+
expect(action_called).to be(true)
|
166
167
|
end
|
167
168
|
|
168
169
|
it "raises an error if that provider doesn't exist" do
|
@@ -206,14 +207,14 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
206
207
|
expect(opts[:box_download_ca_cert]).to eq("foo")
|
207
208
|
expect(opts[:box_download_ca_path]).to eq("bar")
|
208
209
|
expect(opts[:box_client_cert]).to eq("baz")
|
209
|
-
expect(opts[:box_download_insecure]).to
|
210
|
+
expect(opts[:box_download_insecure]).to be(true)
|
210
211
|
end
|
211
212
|
|
212
213
|
opts
|
213
214
|
end
|
214
215
|
|
215
216
|
subject.execute
|
216
|
-
expect(action_called).to
|
217
|
+
expect(action_called).to be(true)
|
217
218
|
end
|
218
219
|
end
|
219
220
|
|
@@ -238,7 +239,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
238
239
|
box_dir = test_iso_env.box3("foo", "1.0", :virtualbox)
|
239
240
|
box = Vagrant::Box.new(
|
240
241
|
"foo", :virtualbox, "1.0", box_dir, metadata_url: "foo")
|
241
|
-
box.
|
242
|
+
allow(box).to receive(:has_update?).and_return(nil)
|
242
243
|
box
|
243
244
|
end
|
244
245
|
|
@@ -249,7 +250,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
249
250
|
end
|
250
251
|
|
251
252
|
it "doesn't update boxes if they're up-to-date" do
|
252
|
-
machine.
|
253
|
+
allow(machine).to receive(:box).and_return(box)
|
253
254
|
expect(box).to receive(:has_update?).
|
254
255
|
with(machine.config.vm.box_version,
|
255
256
|
{download_options:
|
@@ -285,7 +286,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
285
286
|
RAW
|
286
287
|
}
|
287
288
|
|
288
|
-
before { machine.
|
289
|
+
before { allow(machine).to receive(:box).and_return(box) }
|
289
290
|
|
290
291
|
it "updates boxes" do
|
291
292
|
expect(box).to receive(:has_update?).
|
@@ -295,7 +296,7 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
295
296
|
insecure: false}}).
|
296
297
|
and_return([md, md.version("1.1"), md.version("1.1").provider("virtualbox")])
|
297
298
|
|
298
|
-
expect(action_runner).to receive(:run).with { |action, opts|
|
299
|
+
expect(action_runner).to receive(:run).with(any_args) { |action, opts|
|
299
300
|
expect(opts[:box_url]).to eq(box.metadata_url)
|
300
301
|
expect(opts[:box_provider]).to eq("virtualbox")
|
301
302
|
expect(opts[:box_version]).to eq("1.1")
|
@@ -322,11 +323,11 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
322
323
|
insecure: false}}).
|
323
324
|
and_return([md, md.version("1.1"), md.version("1.1").provider("virtualbox")])
|
324
325
|
|
325
|
-
expect(action_runner).to receive(:run).with { |action, opts|
|
326
|
+
expect(action_runner).to receive(:run).with(any_args) { |action, opts|
|
326
327
|
expect(opts[:box_download_ca_cert]).to eq("oof")
|
327
328
|
expect(opts[:box_download_ca_path]).to eq("rab")
|
328
329
|
expect(opts[:box_client_cert]).to eq("zab")
|
329
|
-
expect(opts[:box_download_insecure]).to
|
330
|
+
expect(opts[:box_download_insecure]).to be(false)
|
330
331
|
true
|
331
332
|
}
|
332
333
|
|
@@ -345,11 +346,32 @@ describe VagrantPlugins::CommandBox::Command::Update do
|
|
345
346
|
and_return([md, md.version("1.1"),
|
346
347
|
md.version("1.1").provider("virtualbox")])
|
347
348
|
|
348
|
-
expect(action_runner).to receive(:run).with { |action, opts|
|
349
|
+
expect(action_runner).to receive(:run).with(any_args) { |action, opts|
|
349
350
|
expect(opts[:box_download_ca_cert]).to eq("foo")
|
350
351
|
expect(opts[:box_download_ca_path]).to eq("bar")
|
351
352
|
expect(opts[:box_client_cert]).to eq("baz")
|
352
|
-
expect(opts[:box_download_insecure]).to
|
353
|
+
expect(opts[:box_download_insecure]).to be(true)
|
354
|
+
true
|
355
|
+
}
|
356
|
+
|
357
|
+
subject.execute
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
context "force flag is specified on the command line" do
|
362
|
+
let(:argv) { ["--force"].concat(download_options) }
|
363
|
+
|
364
|
+
it "passes force through to action_box_add as true" do
|
365
|
+
expect(box).to receive(:has_update?).
|
366
|
+
with(machine.config.vm.box_version,
|
367
|
+
{download_options:
|
368
|
+
{ca_cert: "foo", ca_path: "bar", client_cert: "baz",
|
369
|
+
insecure: true}}).
|
370
|
+
and_return([md, md.version("1.1"),
|
371
|
+
md.version("1.1").provider("virtualbox")])
|
372
|
+
|
373
|
+
expect(action_runner).to receive(:run).with(any_args) { |action, opts|
|
374
|
+
expect(opts[:box_force]).to be(true)
|
353
375
|
true
|
354
376
|
}
|
355
377
|
|
@@ -16,7 +16,7 @@ describe VagrantPlugins::CommandInit::Command do
|
|
16
16
|
let(:vagrantfile_path) { File.join(env.cwd, "Vagrantfile") }
|
17
17
|
|
18
18
|
before do
|
19
|
-
Vagrant.plugin("2").manager.
|
19
|
+
allow(Vagrant.plugin("2").manager).to receive(:commands).and_return({})
|
20
20
|
end
|
21
21
|
|
22
22
|
after do
|
@@ -19,7 +19,7 @@ describe VagrantPlugins::CommandListCommands::Command do
|
|
19
19
|
subject { described_class.new(argv, iso_env) }
|
20
20
|
|
21
21
|
before do
|
22
|
-
Vagrant.plugin("2").manager.
|
22
|
+
allow(Vagrant.plugin("2").manager).to receive(:commands).and_return(commands)
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "execute" do
|
@@ -28,7 +28,7 @@ describe VagrantPlugins::CommandListCommands::Command do
|
|
28
28
|
commands[:bar] = [command_lambda("bar", 0), { primary: true }]
|
29
29
|
commands[:baz] = [command_lambda("baz", 0), { primary: false }]
|
30
30
|
|
31
|
-
expect(iso_env.ui).to receive(:info).with { |message, opts|
|
31
|
+
expect(iso_env.ui).to receive(:info).with(any_args) { |message, opts|
|
32
32
|
expect(message).to include("foo")
|
33
33
|
expect(message).to include("bar")
|
34
34
|
expect(message).to include("baz")
|
@@ -61,6 +61,9 @@ describe VagrantPlugins::LoginCommand::Client do
|
|
61
61
|
"login" => "foo",
|
62
62
|
"password" => "bar",
|
63
63
|
},
|
64
|
+
"token" => {
|
65
|
+
"description" => "Token description"
|
66
|
+
}
|
64
67
|
}
|
65
68
|
|
66
69
|
response = {
|
@@ -76,7 +79,8 @@ describe VagrantPlugins::LoginCommand::Client do
|
|
76
79
|
with(body: JSON.dump(request), headers: headers).
|
77
80
|
to_return(status: 200, body: JSON.dump(response))
|
78
81
|
|
79
|
-
expect(subject.login("foo", "bar"
|
82
|
+
expect(subject.login("foo", "bar", description: "Token description"))
|
83
|
+
.to eq("baz")
|
80
84
|
end
|
81
85
|
|
82
86
|
it "returns nil on bad login" do
|
@@ -25,7 +25,7 @@ describe VagrantPlugins::CommandPackage::Command do
|
|
25
25
|
let(:action_runner) { double("action_runner") }
|
26
26
|
|
27
27
|
before do
|
28
|
-
iso_env.
|
28
|
+
allow(iso_env).to receive(:action_runner).and_return(action_runner)
|
29
29
|
end
|
30
30
|
|
31
31
|
describe "#execute" do
|
@@ -27,7 +27,7 @@ describe VagrantPlugins::CommandPlugin::Action::ExpungePlugins do
|
|
27
27
|
subject { described_class.new(app, env) }
|
28
28
|
|
29
29
|
before do
|
30
|
-
Vagrant::Plugin::Manager.
|
30
|
+
allow(Vagrant::Plugin::Manager).to receive(:instance).and_return(manager)
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "#call" do
|
@@ -11,7 +11,7 @@ describe VagrantPlugins::CommandPlugin::Action::InstallGem do
|
|
11
11
|
subject { described_class.new(app, env) }
|
12
12
|
|
13
13
|
before do
|
14
|
-
Vagrant::Plugin::Manager.
|
14
|
+
allow(Vagrant::Plugin::Manager).to receive(:instance).and_return(manager)
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "#call" do
|
@@ -75,7 +75,7 @@ describe VagrantPlugins::CommandPlugin::Action::InstallGem do
|
|
75
75
|
before do
|
76
76
|
spec = Gem::Specification.new
|
77
77
|
spec.name = "foo"
|
78
|
-
manager.
|
78
|
+
allow(manager).to receive(:install_plugin).and_return(spec)
|
79
79
|
|
80
80
|
env[:plugin_name] = "foo"
|
81
81
|
subject.call(env)
|
@@ -84,7 +84,7 @@ describe VagrantPlugins::CommandPlugin::Action::InstallGem do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "should uninstall the plugin" do
|
87
|
-
expect(action_runner).to receive(:run).with { |action, newenv|
|
87
|
+
expect(action_runner).to receive(:run).with(any_args) { |action, newenv|
|
88
88
|
expect(newenv[:plugin_name]).to eql("foo")
|
89
89
|
}
|
90
90
|
|
@@ -9,11 +9,11 @@ describe VagrantPlugins::CommandPlugin::Action::PluginExistsCheck do
|
|
9
9
|
subject { described_class.new(app, env) }
|
10
10
|
|
11
11
|
before do
|
12
|
-
Vagrant::Plugin::Manager.
|
12
|
+
allow(Vagrant::Plugin::Manager).to receive(:instance).and_return(manager)
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should raise an exception if the plugin doesn't exist" do
|
16
|
-
manager.
|
16
|
+
allow(manager).to receive(:installed_plugins).and_return({ "foo" => {} })
|
17
17
|
expect(app).not_to receive(:call)
|
18
18
|
|
19
19
|
env[:plugin_name] = "bar"
|
@@ -22,7 +22,7 @@ describe VagrantPlugins::CommandPlugin::Action::PluginExistsCheck do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should call the app if the plugin is installed" do
|
25
|
-
manager.
|
25
|
+
allow(manager).to receive(:installed_plugins).and_return({ "bar" => {} })
|
26
26
|
expect(app).to receive(:call).once.with(env)
|
27
27
|
|
28
28
|
env[:plugin_name] = "bar"
|
@@ -11,7 +11,7 @@ describe VagrantPlugins::CommandPlugin::Action::UninstallPlugin do
|
|
11
11
|
subject { described_class.new(app, env) }
|
12
12
|
|
13
13
|
before do
|
14
|
-
Vagrant::Plugin::Manager.
|
14
|
+
allow(Vagrant::Plugin::Manager).to receive(:instance).and_return(manager)
|
15
15
|
end
|
16
16
|
|
17
17
|
it "uninstalls the specified plugin" do
|
@@ -11,8 +11,8 @@ describe VagrantPlugins::CommandPlugin::Action::UpdateGems do
|
|
11
11
|
subject { described_class.new(app, env) }
|
12
12
|
|
13
13
|
before do
|
14
|
-
Vagrant::Plugin::Manager.
|
15
|
-
manager.
|
14
|
+
allow(Vagrant::Plugin::Manager).to receive(:instance).and_return(manager)
|
15
|
+
allow(manager).to receive(:installed_specs).and_return([])
|
16
16
|
end
|
17
17
|
|
18
18
|
describe "#call" do
|
@@ -53,7 +53,7 @@ describe VagrantPlugins::CommandPort::Command do
|
|
53
53
|
|
54
54
|
it "ensures the vm is running" do
|
55
55
|
allow(state).to receive(:id).and_return(:stopped)
|
56
|
-
expect(env.ui).to receive(:error).with { |message, _|
|
56
|
+
expect(env.ui).to receive(:error).with(any_args) { |message, _|
|
57
57
|
expect(message).to include("does not support listing forwarded ports")
|
58
58
|
}
|
59
59
|
|
@@ -62,7 +62,7 @@ describe VagrantPlugins::CommandPort::Command do
|
|
62
62
|
|
63
63
|
it "shows a friendly error when the capability is not supported" do
|
64
64
|
allow(machine.provider).to receive(:capability?).and_return(false)
|
65
|
-
expect(env.ui).to receive(:error).with { |message, _|
|
65
|
+
expect(env.ui).to receive(:error).with(any_args) { |message, _|
|
66
66
|
expect(message).to include("does not support listing forwarded ports")
|
67
67
|
}
|
68
68
|
|
@@ -74,7 +74,7 @@ describe VagrantPlugins::CommandPort::Command do
|
|
74
74
|
allow(machine.provider).to receive(:capability).with(:forwarded_ports)
|
75
75
|
.and_return([])
|
76
76
|
|
77
|
-
expect(env.ui).to receive(:info).with { |message, _|
|
77
|
+
expect(env.ui).to receive(:info).with(any_args) { |message, _|
|
78
78
|
expect(message).to include("there are no forwarded ports")
|
79
79
|
}
|
80
80
|
|
@@ -22,7 +22,7 @@ describe VagrantPlugins::CommandPush::Command do
|
|
22
22
|
subject { described_class.new(argv, env) }
|
23
23
|
|
24
24
|
before do
|
25
|
-
Vagrant.plugin("2").manager.
|
25
|
+
allow(Vagrant.plugin("2").manager).to receive(:pushes).and_return(pushes)
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "#execute" do
|
@@ -52,9 +52,8 @@ describe VagrantPlugins::CommandSnapshot::Command::List do
|
|
52
52
|
it "prints a message if the vm does not exist" do
|
53
53
|
machine.id = nil
|
54
54
|
|
55
|
-
expect(iso_env.ui).to receive(:info).with
|
56
|
-
|
57
|
-
}
|
55
|
+
expect(iso_env.ui).to receive(:info).with("==> default: VM not created. Moving on...", anything)
|
56
|
+
.and_return({})
|
58
57
|
expect(machine).to_not receive(:action)
|
59
58
|
expect(subject.execute).to eq(0)
|
60
59
|
end
|
@@ -32,7 +32,7 @@ describe VagrantPlugins::CommandSSHConfig::Command do
|
|
32
32
|
subject { described_class.new(argv, iso_env) }
|
33
33
|
|
34
34
|
before do
|
35
|
-
machine.
|
35
|
+
allow(machine).to receive(:ssh_info).and_return(ssh_info)
|
36
36
|
allow(subject).to receive(:with_target_vms) { |&block| block.call machine }
|
37
37
|
end
|
38
38
|
|
@@ -5,6 +5,7 @@ require Vagrant.source_root.join("plugins/commands/up/command")
|
|
5
5
|
describe VagrantPlugins::CommandUp::Command do
|
6
6
|
include_context "unit"
|
7
7
|
|
8
|
+
let(:entry_klass) { Vagrant::MachineIndex::Entry }
|
8
9
|
let(:argv) { [] }
|
9
10
|
let(:vagrantfile_content){ "" }
|
10
11
|
let(:iso_env) do
|
@@ -17,8 +18,15 @@ describe VagrantPlugins::CommandUp::Command do
|
|
17
18
|
|
18
19
|
let(:action_runner) { double("action_runner") }
|
19
20
|
|
21
|
+
def new_entry(name)
|
22
|
+
entry_klass.new.tap do |e|
|
23
|
+
e.name = name
|
24
|
+
e.vagrantfile_path = "/bar"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
before do
|
21
|
-
iso_env.
|
29
|
+
allow(iso_env).to receive(:action_runner).and_return(action_runner)
|
22
30
|
end
|
23
31
|
|
24
32
|
context "with no argument" do
|
@@ -47,7 +55,7 @@ describe VagrantPlugins::CommandUp::Command do
|
|
47
55
|
end
|
48
56
|
|
49
57
|
it "should attempt to use dummy provider" do
|
50
|
-
expect{ subject.execute }.to raise_error
|
58
|
+
expect{ subject.execute }.to raise_error(Vagrant::Errors::ProviderNotFound)
|
51
59
|
end
|
52
60
|
|
53
61
|
context "with --provider set" do
|
@@ -62,4 +70,63 @@ describe VagrantPlugins::CommandUp::Command do
|
|
62
70
|
end
|
63
71
|
end
|
64
72
|
end
|
73
|
+
|
74
|
+
context "with a global machine" do
|
75
|
+
let(:argv){ ["1234"] }
|
76
|
+
|
77
|
+
it "brings up a vm with an id" do
|
78
|
+
|
79
|
+
global_env = isolated_environment
|
80
|
+
global_env.vagrantfile("Vagrant.configure(2){|config| config.vm.box = 'dummy'}")
|
81
|
+
global_venv = global_env.create_vagrant_env
|
82
|
+
global_machine = global_venv.machine(global_venv.machine_names[0], :dummy)
|
83
|
+
global_machine.id = "1234"
|
84
|
+
global = new_entry(global_machine.name)
|
85
|
+
global.provider = "dummy"
|
86
|
+
global.vagrantfile_path = global_env.workdir
|
87
|
+
locked = iso_env.machine_index.set(global)
|
88
|
+
iso_env.machine_index.release(locked)
|
89
|
+
|
90
|
+
allow(subject).to receive(:with_target_vms) { |&block| block.call global_machine }
|
91
|
+
|
92
|
+
|
93
|
+
batch = double("environment_batch")
|
94
|
+
expect(iso_env).to receive(:batch).and_yield(batch)
|
95
|
+
expect(batch).to receive(:action).with(global_machine, :up, anything) do |machine,action,args|
|
96
|
+
expect(machine).to be_kind_of(Vagrant::Machine)
|
97
|
+
expect(action).to eq(:up)
|
98
|
+
end
|
99
|
+
subject.execute
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
context "with an argument" do
|
104
|
+
let(:vagrantfile_content) do
|
105
|
+
<<-VF
|
106
|
+
Vagrant.configure("2") do |config|
|
107
|
+
config.vm.define "app"
|
108
|
+
config.vm.define "db"
|
109
|
+
end
|
110
|
+
VF
|
111
|
+
end
|
112
|
+
let(:argv){ ["app"] }
|
113
|
+
let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
|
114
|
+
|
115
|
+
it "brings up a vm" do
|
116
|
+
batch = double("environment_batch")
|
117
|
+
expect(iso_env).to receive(:batch).and_yield(batch)
|
118
|
+
expect(batch).to receive(:action).with(machine, :up, anything) do |machine,action,args|
|
119
|
+
expect(machine).to be_kind_of(Vagrant::Machine)
|
120
|
+
expect(action).to eq(:up)
|
121
|
+
end
|
122
|
+
subject.execute
|
123
|
+
end
|
124
|
+
|
125
|
+
context "with an invalid argument" do
|
126
|
+
let(:argv){ ["notweb"] }
|
127
|
+
it "brings up a vm" do
|
128
|
+
expect { subject.execute }.to raise_error(Vagrant::Errors::MachineNotFound)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
65
132
|
end
|
@@ -30,7 +30,7 @@ describe VagrantPlugins::CommandValidate::Command do
|
|
30
30
|
end
|
31
31
|
EOH
|
32
32
|
|
33
|
-
expect(env.ui).to receive(:info).with { |message, _|
|
33
|
+
expect(env.ui).to receive(:info).with(any_args) { |message, _|
|
34
34
|
expect(message).to include("Vagrantfile validated successfully.")
|
35
35
|
}
|
36
36
|
|
@@ -48,5 +48,51 @@ describe VagrantPlugins::CommandValidate::Command do
|
|
48
48
|
expect(err.message).to include("The following settings shouldn't exist: bix")
|
49
49
|
}
|
50
50
|
end
|
51
|
+
|
52
|
+
it "validates correct Vagrantfile of all vms" do
|
53
|
+
iso_env.vagrantfile <<-EOH
|
54
|
+
Vagrant.configure("2") do |config|
|
55
|
+
config.vm.box = "hashicorp/precise64"
|
56
|
+
|
57
|
+
config.vm.define "test" do |vm|
|
58
|
+
vm.vm.provider :virtualbox
|
59
|
+
end
|
60
|
+
|
61
|
+
config.vm.define "machine" do |vm|
|
62
|
+
vm.vm.provider :virtualbox
|
63
|
+
end
|
64
|
+
end
|
65
|
+
EOH
|
66
|
+
|
67
|
+
expect(env.ui).to receive(:info).with(any_args) { |message, _|
|
68
|
+
expect(message).to include("Vagrantfile validated successfully.")
|
69
|
+
}
|
70
|
+
|
71
|
+
expect(subject.execute).to eq(0)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "validates the configuration of all vms" do
|
75
|
+
iso_env.vagrantfile <<-EOH
|
76
|
+
Vagrant.configure("2") do |config|
|
77
|
+
config.vm.box = "hashicorp/precise64"
|
78
|
+
|
79
|
+
config.vm.define "test" do |vm|
|
80
|
+
vm.vm.provider :virtualbox
|
81
|
+
end
|
82
|
+
|
83
|
+
config.vm.define "machine" do |vm|
|
84
|
+
vm.vm.not_provider :virtualbox
|
85
|
+
end
|
86
|
+
end
|
87
|
+
EOH
|
88
|
+
|
89
|
+
expect { subject.execute }.to raise_error(Vagrant::Errors::ConfigInvalid) { |err|
|
90
|
+
expect(err.message).to include("The following settings shouldn't exist: not_provider")
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
it "throws an exception if there's no Vagrantfile" do
|
95
|
+
expect { subject.execute }.to raise_error(Vagrant::Errors::NoEnvironmentError)
|
96
|
+
end
|
51
97
|
end
|
52
98
|
end
|