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
@@ -109,7 +109,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
|
|
109
109
|
describe ".ready?" do
|
110
110
|
before(&connection_setup)
|
111
111
|
it "returns true if shell test is successful" do
|
112
|
-
expect(communicator.ready?).to
|
112
|
+
expect(communicator.ready?).to be(true)
|
113
113
|
end
|
114
114
|
|
115
115
|
context "with an invalid shell test" do
|
@@ -268,7 +268,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
|
|
268
268
|
before(&connection_setup)
|
269
269
|
context "with exit code as zero" do
|
270
270
|
it "returns true" do
|
271
|
-
expect(communicator.test("ls")).to
|
271
|
+
expect(communicator.test("ls")).to be(true)
|
272
272
|
end
|
273
273
|
end
|
274
274
|
|
@@ -278,7 +278,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
|
|
278
278
|
end
|
279
279
|
|
280
280
|
it "returns false" do
|
281
|
-
expect(communicator.test("/bin/false")).to
|
281
|
+
expect(communicator.test("/bin/false")).to be(false)
|
282
282
|
end
|
283
283
|
end
|
284
284
|
end
|
@@ -585,14 +585,14 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
|
|
585
585
|
|
586
586
|
describe ".generate_environment_export" do
|
587
587
|
it "should generate bourne shell compatible export" do
|
588
|
-
communicator.send(:generate_environment_export, "TEST", "value").
|
588
|
+
expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("export TEST=\"value\"\n")
|
589
589
|
end
|
590
590
|
|
591
591
|
context "with custom template defined" do
|
592
592
|
let(:export_command_template){ "setenv %ENV_KEY% %ENV_VALUE%" }
|
593
593
|
|
594
594
|
it "should generate custom export based on template" do
|
595
|
-
communicator.send(:generate_environment_export, "TEST", "value").
|
595
|
+
expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("setenv TEST value\n")
|
596
596
|
end
|
597
597
|
end
|
598
598
|
end
|
@@ -60,12 +60,12 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do
|
|
60
60
|
describe ".ready?" do
|
61
61
|
it "returns true if hostname command executes without error" do
|
62
62
|
expect(shell).to receive(:cmd).with("hostname").and_return({ exitcode: 0 })
|
63
|
-
expect(subject.ready?).to
|
63
|
+
expect(subject.ready?).to be(true)
|
64
64
|
end
|
65
65
|
|
66
66
|
it "returns false if hostname command fails with a transient error" do
|
67
67
|
expect(shell).to receive(:cmd).with("hostname").and_raise(VagrantPlugins::CommunicatorWinRM::Errors::TransientError)
|
68
|
-
expect(subject.ready?).to
|
68
|
+
expect(subject.ready?).to be(false)
|
69
69
|
end
|
70
70
|
|
71
71
|
it "raises an error if hostname command fails with an unknown error" do
|
@@ -112,12 +112,12 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do
|
|
112
112
|
describe ".test" do
|
113
113
|
it "returns true when exit code is zero" do
|
114
114
|
expect(shell).to receive(:powershell).with(kind_of(String)).and_return(good_output)
|
115
|
-
expect(subject.test("test -d c:/windows")).to
|
115
|
+
expect(subject.test("test -d c:/windows")).to be(true)
|
116
116
|
end
|
117
117
|
|
118
118
|
it "returns false when exit code is non-zero" do
|
119
119
|
expect(shell).to receive(:powershell).with(kind_of(String)).and_return(bad_output)
|
120
|
-
expect(subject.test("test -d /tmp/foobar")).to
|
120
|
+
expect(subject.test("test -d /tmp/foobar")).to be(false)
|
121
121
|
end
|
122
122
|
|
123
123
|
it "returns false when stderr contains output" do
|
@@ -125,11 +125,11 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do
|
|
125
125
|
output.exitcode = 1
|
126
126
|
output << { stderr: 'this is an error' }
|
127
127
|
expect(shell).to receive(:powershell).with(kind_of(String)).and_return(output)
|
128
|
-
expect(subject.test("[-x stuff] && foo")).to
|
128
|
+
expect(subject.test("[-x stuff] && foo")).to be(false)
|
129
129
|
end
|
130
130
|
|
131
131
|
it "returns false when command is testing for linux OS" do
|
132
|
-
expect(subject.test("uname -s | grep Debian")).to
|
132
|
+
expect(subject.test("uname -s | grep Debian")).to be(false)
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
@@ -27,24 +27,24 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it "returns the SSH info host if available" do
|
30
|
-
machine.
|
30
|
+
allow(machine).to receive(:ssh_info).and_return({ host: "bar" })
|
31
31
|
expect(subject.winrm_address(machine)).to eq("bar")
|
32
32
|
end
|
33
33
|
|
34
34
|
it "raise an exception if it can't detect a host" do
|
35
|
-
machine.
|
35
|
+
allow(machine).to receive(:ssh_info).and_return(nil)
|
36
36
|
expect { subject.winrm_address(machine) }.
|
37
37
|
to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "raise an exception if it detects an empty host ip" do
|
41
|
-
machine.
|
41
|
+
allow(machine).to receive(:ssh_info).and_return({ host: "" })
|
42
42
|
expect { subject.winrm_address(machine) }.
|
43
43
|
to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
|
44
44
|
end
|
45
45
|
|
46
46
|
it "raise a WinRMNotReady exception if it detects an unset host ip" do
|
47
|
-
machine.
|
47
|
+
allow(machine).to receive(:ssh_info).and_return({ host: nil })
|
48
48
|
expect { subject.winrm_address(machine) }.
|
49
49
|
to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
|
50
50
|
end
|
@@ -52,15 +52,15 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
|
|
52
52
|
|
53
53
|
describe ".winrm_info" do
|
54
54
|
before do
|
55
|
-
machine.provider.
|
56
|
-
with(:winrm_info).and_return(false)
|
57
|
-
subject.
|
58
|
-
subject.
|
55
|
+
allow(machine.provider).to receive(:capability?)
|
56
|
+
.with(:winrm_info).and_return(false)
|
57
|
+
allow(subject).to receive(:winrm_address).and_return(nil)
|
58
|
+
allow(subject).to receive(:winrm_port).and_return(nil)
|
59
59
|
end
|
60
60
|
|
61
61
|
it "returns default info if no capability" do
|
62
|
-
subject.
|
63
|
-
subject.
|
62
|
+
allow(subject).to receive(:winrm_address).and_return("bar")
|
63
|
+
allow(subject).to receive(:winrm_port).and_return(45)
|
64
64
|
|
65
65
|
result = subject.winrm_info(machine)
|
66
66
|
expect(result[:host]).to eq("bar")
|
@@ -68,18 +68,19 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "raises an exception if capability returns nil" do
|
71
|
-
machine.provider.
|
72
|
-
with(:winrm_info).and_return(true)
|
73
|
-
machine.provider.
|
71
|
+
allow(machine.provider).to receive(:capability?)
|
72
|
+
.with(:winrm_info).and_return(true)
|
73
|
+
allow(machine.provider).to receive(:capability)
|
74
|
+
.with(:winrm_info).and_return(nil)
|
74
75
|
|
75
76
|
expect { subject.winrm_info(machine) }.
|
76
77
|
to raise_error(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
|
77
78
|
end
|
78
79
|
|
79
80
|
it "returns the proper information if set" do
|
80
|
-
machine.provider.
|
81
|
-
with(:winrm_info).and_return(true)
|
82
|
-
machine.provider.
|
81
|
+
allow(machine.provider).to receive(:capability?)
|
82
|
+
.with(:winrm_info).and_return(true)
|
83
|
+
allow(machine.provider).to receive(:capability).with(:winrm_info).and_return({
|
83
84
|
host: "foo",
|
84
85
|
port: 12,
|
85
86
|
})
|
@@ -90,12 +91,12 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
|
|
90
91
|
end
|
91
92
|
|
92
93
|
it "defaults information if capability doesn't set it" do
|
93
|
-
machine.provider.
|
94
|
-
with(:winrm_info).and_return(true)
|
95
|
-
machine.provider.
|
94
|
+
allow(machine.provider).to receive(:capability?)
|
95
|
+
.with(:winrm_info).and_return(true)
|
96
|
+
allow(machine.provider).to receive(:capability).with(:winrm_info).and_return({})
|
96
97
|
|
97
|
-
subject.
|
98
|
-
subject.
|
98
|
+
allow(subject).to receive(:winrm_address).and_return("bar")
|
99
|
+
allow(subject).to receive(:winrm_port).and_return(45)
|
99
100
|
|
100
101
|
result = subject.winrm_info(machine)
|
101
102
|
expect(result[:host]).to eq("bar")
|
@@ -132,8 +133,8 @@ describe VagrantPlugins::CommunicatorWinRM::Helper do
|
|
132
133
|
machine.config.winrm.guest_port = 2222
|
133
134
|
machine.config.vm.network "forwarded_port", host: 1234, guest: 2222
|
134
135
|
|
135
|
-
machine.provider.
|
136
|
-
machine.provider.
|
136
|
+
allow(machine.provider).to receive(:capability?).with(:forwarded_ports).and_return(true)
|
137
|
+
allow(machine.provider).to receive(:capability).with(:forwarded_ports).and_return({
|
137
138
|
1234 => 4567,
|
138
139
|
2456 => 2222,
|
139
140
|
})
|
@@ -127,7 +127,7 @@ describe VagrantPlugins::CommunicatorWinSSH::Communicator do
|
|
127
127
|
describe ".ready?" do
|
128
128
|
before(&connection_setup)
|
129
129
|
it "returns true if shell test is successful" do
|
130
|
-
expect(communicator.ready?).to
|
130
|
+
expect(communicator.ready?).to be_truthy
|
131
131
|
end
|
132
132
|
|
133
133
|
context "with an invalid shell test" do
|
@@ -209,7 +209,7 @@ describe VagrantPlugins::CommunicatorWinSSH::Communicator do
|
|
209
209
|
before(&connection_setup)
|
210
210
|
context "with exit code as zero" do
|
211
211
|
it "returns true" do
|
212
|
-
expect(communicator.test("dir")).to
|
212
|
+
expect(communicator.test("dir")).to be_truthy
|
213
213
|
end
|
214
214
|
end
|
215
215
|
|
@@ -219,7 +219,7 @@ describe VagrantPlugins::CommunicatorWinSSH::Communicator do
|
|
219
219
|
end
|
220
220
|
|
221
221
|
it "returns false" do
|
222
|
-
expect(communicator.test("false.exe")).to
|
222
|
+
expect(communicator.test("false.exe")).to be_falsey
|
223
223
|
end
|
224
224
|
end
|
225
225
|
end
|
@@ -512,14 +512,14 @@ describe VagrantPlugins::CommunicatorWinSSH::Communicator do
|
|
512
512
|
|
513
513
|
describe ".generate_environment_export" do
|
514
514
|
it "should generate bourne shell compatible export" do
|
515
|
-
communicator.send(:generate_environment_export, "TEST", "value").
|
515
|
+
expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("export TEST=\"value\"\n")
|
516
516
|
end
|
517
517
|
|
518
518
|
context "with custom template defined" do
|
519
519
|
let(:export_command_template){ "setenv %ENV_KEY% %ENV_VALUE%" }
|
520
520
|
|
521
521
|
it "should generate custom export based on template" do
|
522
|
-
communicator.send(:generate_environment_export, "TEST", "value").
|
522
|
+
expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("setenv TEST value\n")
|
523
523
|
end
|
524
524
|
end
|
525
525
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestDarwin::Cap::ShellExpandGuestPath" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestDarwin::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:darwin]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#shell_expand_guest_path" do
|
18
|
+
let(:cap) { caps.get(:shell_expand_guest_path) }
|
19
|
+
|
20
|
+
it "expands the path" do
|
21
|
+
path = "/home/vagrant/folder"
|
22
|
+
allow(machine.communicate).to receive(:execute).
|
23
|
+
with(any_args).and_yield(:stdout, "/home/vagrant/folder")
|
24
|
+
|
25
|
+
cap.shell_expand_guest_path(machine, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "raises an exception if no path was detected" do
|
29
|
+
path = "/home/vagrant/folder"
|
30
|
+
expect { cap.shell_expand_guest_path(machine, path) }.
|
31
|
+
to raise_error(Vagrant::Errors::ShellExpandFailed)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a path with a space in it" do
|
35
|
+
path = "/home/vagrant folder/folder"
|
36
|
+
allow(machine.communicate).to receive(:execute).
|
37
|
+
with(any_args).and_yield(:stdout, "/home/vagrant folder/folder")
|
38
|
+
|
39
|
+
expect(machine.communicate).to receive(:execute).with("printf \"#{path}\"")
|
40
|
+
cap.shell_expand_guest_path(machine, path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -13,7 +13,7 @@ describe "VagrantPlugins::GuestFreeBSD::Cap::ConfigureNetworks" do
|
|
13
13
|
|
14
14
|
before do
|
15
15
|
allow(machine).to receive(:communicate).and_return(comm)
|
16
|
-
comm.stub_command("ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'",
|
16
|
+
comm.stub_command("ifconfig -a | grep -o '^[0-9a-z]*' | grep -v '^lo'",
|
17
17
|
stdout: "em1\nem2")
|
18
18
|
end
|
19
19
|
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestFreeBSD::Cap::ShellExpandGuestPath" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestFreeBSD::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:freebsd]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#shell_expand_guest_path" do
|
18
|
+
let(:cap) { caps.get(:shell_expand_guest_path) }
|
19
|
+
|
20
|
+
it "expands the path" do
|
21
|
+
path = "/home/vagrant/folder"
|
22
|
+
allow(machine.communicate).to receive(:execute).
|
23
|
+
with(any_args).and_yield(:stdout, "/home/vagrant/folder")
|
24
|
+
|
25
|
+
cap.shell_expand_guest_path(machine, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "raises an exception if no path was detected" do
|
29
|
+
path = "/home/vagrant/folder"
|
30
|
+
expect { cap.shell_expand_guest_path(machine, path) }.
|
31
|
+
to raise_error(Vagrant::Errors::ShellExpandFailed)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a path with a space in it" do
|
35
|
+
path = "/home/vagrant folder/folder"
|
36
|
+
allow(machine.communicate).to receive(:execute).
|
37
|
+
with(any_args).and_yield(:stdout, "/home/vagrant folder/folder")
|
38
|
+
|
39
|
+
expect(machine.communicate).to receive(:execute)
|
40
|
+
.with("printf \"#{path}\"", {:shell=>"sh"})
|
41
|
+
cap.shell_expand_guest_path(machine, path)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestLinux::Cap::ShellExpandGuestPath" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestLinux::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:linux]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#shell_expand_guest_path" do
|
18
|
+
let(:cap) { caps.get(:shell_expand_guest_path) }
|
19
|
+
|
20
|
+
it "expands the path" do
|
21
|
+
path = "/home/vagrant/folder"
|
22
|
+
allow(machine.communicate).to receive(:execute).
|
23
|
+
with(any_args).and_yield(:stdout, "/home/vagrant/folder")
|
24
|
+
|
25
|
+
cap.shell_expand_guest_path(machine, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "raises an exception if no path was detected" do
|
29
|
+
path = "/home/vagrant/folder"
|
30
|
+
expect { cap.shell_expand_guest_path(machine, path) }.
|
31
|
+
to raise_error(Vagrant::Errors::ShellExpandFailed)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a path with a space in it" do
|
35
|
+
path = "/home/vagrant folder/folder"
|
36
|
+
allow(machine.communicate).to receive(:execute).
|
37
|
+
with(any_args).and_yield(:stdout, "/home/vagrant folder/folder")
|
38
|
+
|
39
|
+
expect(machine.communicate).to receive(:execute).with("echo; printf \"#{path}\"")
|
40
|
+
cap.shell_expand_guest_path(machine, path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestNetBSD::Cap::ShellExpandGuestPath" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestNetBSD::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:netbsd]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#shell_expand_guest_path" do
|
18
|
+
let(:cap) { caps.get(:shell_expand_guest_path) }
|
19
|
+
|
20
|
+
it "expands the path" do
|
21
|
+
path = "/home/vagrant/folder"
|
22
|
+
allow(machine.communicate).to receive(:execute).
|
23
|
+
with(any_args).and_yield(:stdout, "/home/vagrant/folder")
|
24
|
+
|
25
|
+
cap.shell_expand_guest_path(machine, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "raises an exception if no path was detected" do
|
29
|
+
path = "/home/vagrant/folder"
|
30
|
+
expect { cap.shell_expand_guest_path(machine, path) }.
|
31
|
+
to raise_error(Vagrant::Errors::ShellExpandFailed)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a path with a space in it" do
|
35
|
+
path = "/home/vagrant folder/folder"
|
36
|
+
allow(machine.communicate).to receive(:execute).
|
37
|
+
with(any_args).and_yield(:stdout, "/home/vagrant folder/folder")
|
38
|
+
|
39
|
+
expect(machine.communicate).to receive(:execute).with("printf \"#{path}\"")
|
40
|
+
cap.shell_expand_guest_path(machine, path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -40,8 +40,6 @@ describe "VagrantPlugins::GuestOmniOS::Cap:RSync" do
|
|
40
40
|
expect(comm.received_commands[0]).to match(/'1.2.3.4:#{hostpath}' '#{guestpath}'/)
|
41
41
|
end
|
42
42
|
|
43
|
-
it "mounts with options"
|
44
|
-
pending "not yet implemented"
|
45
|
-
end
|
43
|
+
it "mounts with options"
|
46
44
|
end
|
47
45
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative "../../../../base"
|
2
|
+
|
3
|
+
describe "VagrantPlugins::GuestOpenBSD::Cap::ShellExpandGuestPath" do
|
4
|
+
let(:caps) do
|
5
|
+
VagrantPlugins::GuestOpenBSD::Plugin
|
6
|
+
.components
|
7
|
+
.guest_capabilities[:openbsd]
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:machine) { double("machine") }
|
11
|
+
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
allow(machine).to receive(:communicate).and_return(comm)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#shell_expand_guest_path" do
|
18
|
+
let(:cap) { caps.get(:shell_expand_guest_path) }
|
19
|
+
|
20
|
+
it "expands the path" do
|
21
|
+
path = "/home/vagrant/folder"
|
22
|
+
allow(machine.communicate).to receive(:execute).
|
23
|
+
with(any_args).and_yield(:stdout, "/home/vagrant/folder")
|
24
|
+
|
25
|
+
cap.shell_expand_guest_path(machine, path)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "raises an exception if no path was detected" do
|
29
|
+
path = "/home/vagrant/folder"
|
30
|
+
expect { cap.shell_expand_guest_path(machine, path) }.
|
31
|
+
to raise_error(Vagrant::Errors::ShellExpandFailed)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a path with a space in it" do
|
35
|
+
path = "/home/vagrant folder/folder"
|
36
|
+
allow(machine.communicate).to receive(:execute).
|
37
|
+
with(any_args).and_yield(:stdout, "/home/vagrant folder/folder")
|
38
|
+
|
39
|
+
expect(machine.communicate).to receive(:execute).with("printf \"#{path}\"")
|
40
|
+
cap.shell_expand_guest_path(machine, path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|