170 Commits

Author SHA1 Message Date
sophia
e2f012ff58 Escape value being scrubbed 2020-08-20 18:03:01 -05:00
sophia
27b37ea838 Scrub credentials as whole words, don't capture matching substrings 2020-08-18 11:38:04 -05:00
Chris Roberts
98ffa4add0 Speed up open port detection 2020-08-07 16:38:15 -07:00
Sophia Castellarin
be10e060e6
Merge pull request #11732 from soapy1/detach-from-subprocess
Detach from subprocess
2020-08-07 11:11:03 -05:00
Jeff Bonhag
f0f681716d
Merge pull request #11787 from fliam/fix-privileged-powershell-executable-on-wsl
Use the correct powershell executable for privileged commands
2020-07-30 16:11:00 -04:00
Sophia Castellarin
f49e9f9700
Merge pull request #11719 from soapy1/change-host-name-cap-darwin
Make darwin + openbsd +freebsd guest respect 'hostname' network config option
2020-07-30 12:27:38 -05:00
Sophia Castellarin
99c34855ef
Merge pull request #11750 from soapy1/build-iso-module
Refactor building ISO cap
2020-07-29 14:16:04 -05:00
Liam Feid
d6ea67ac32 Test that the correct powershell executable is used for privileged commands 2020-07-29 12:19:41 +02:00
sophia
5caae15f22 Move isofs_available cap to plugin 2020-07-23 14:42:45 -05:00
Sophia Castellarin
cb1ade9332
Merge pull request #11523 from soapy1/install-autocomplete-cmd
Install zsh autocomplete
2020-07-23 13:59:36 -05:00
Sophia Castellarin
a883a8a7c7
Merge pull request #11738 from uzxmx/fix-failed-tests
Fix sometimes-failed test cases that depend on running order
2020-07-16 11:38:02 -05:00
sophia
8e406184cb Add windows cap for building iso 2020-07-08 11:51:09 -05:00
sophia
b1d1c20ff7 Refactor building iso 2020-07-08 11:40:00 -05:00
Sophia Castellarin
02ef62dcff
Merge pull request #11694 from soapy1/host-cap-build-iso
Build iso for Darwin host
2020-07-07 10:29:52 -05:00
Mingxiang Xue
035ae6d460 Fix sometimes-failed test cases that may depend on running order
Signed-off-by: Mingxiang Xue <mingxiangxue@gmail.com>
2020-07-03 20:40:02 +08:00
sophia
ee90e11832 Test detach option 2020-06-30 17:24:25 -05:00
sophia
8bad23d176 Update OpenBSD guest change hostname cap 2020-06-29 17:02:43 -05:00
sophia
db6d1b4aa6 Make darwin guest respect 'hostname' network config option 2020-06-29 12:03:12 -05:00
sophia
1ff6582fff Refactor out shared utility 2020-06-16 09:32:37 -05:00
sophia
e3e573c133 Rescue if an invalid netmask is provided 2020-06-15 17:06:07 -05:00
sophia
36a086a4d1 Validate netmask value from VirtualBox 2020-06-08 12:21:29 -05:00
Jeff Bonhag
a8de98f97a
Default #in_installer? to false
This ensures that these tests will pass if the environment has
`VAGRANT_INSTALLER_ENV=1` set (e.g. in a local development environment).
2020-06-03 11:42:57 -04:00
sophia
043008a3c4 Raise error if trying to install unsupported shell 2020-05-29 15:10:13 -04:00
sophia
5c6c748dc2 Mock out file 2020-05-29 15:10:13 -04:00
sophia
a59eedb748 Rework install shell config classes 2020-05-29 15:10:13 -04:00
sophia
d6175e0c66 Give feedback to user about which files have been modified for autocopmletion to be enabled 2020-05-29 15:10:13 -04:00
sophia
89503d9a66 Install zsh autocomplete 2020-05-29 15:10:13 -04:00
Brian Cain
fab786cc28
Merge pull request #11602 from briancain/feature/docker-port-collision-fix
Fixes #9067: Ensure new containers don't grab existing bound ports
2020-05-29 08:37:23 -07:00
Brian Cain
f22feac515
Use example domain in downloader tests 2020-05-21 07:59:02 -07:00
Brian Cain
5aff6660fb
Move port checker method to class rather than instance
This commit also moves out the ipv4_interfaces method to be a util
method, so that the port checker can also access it as a class mehtod
2020-05-12 10:54:23 -07:00
Chris Roberts
f5b75ed0d6 Update IO util to properly handle unknown conversion errors
When converting encoding to UTF-8 on Windows, allow for unknown
conversions to be properly handled and prevent generating an
error.
2020-05-04 13:25:53 -07:00
sophia
646de433a9 Validate conversion of map to cmd options 2020-04-29 15:10:48 -04:00
sophia
7e125969dd Add option box_download_options
Allow users to specify a map of extra options to pass to the downloader.
These options will be passed to curl, with a `--` appended to the key
2020-04-29 15:10:44 -04:00
sophia
39d7cd8997 Wrap all progress type outputs with rewriting to enable --no-tty 2020-04-03 16:28:59 -04:00
Jeff Bonhag
6efdcd2068
Merge pull request #11430 from chrisroberts/winssh-hacks
Fix issues with Windows SSH provisioner (continued...)
2020-03-11 10:39:44 -04:00
Chris Roberts
bee56a09df
Merge pull request #11366 from dmitrivereshchagin/fix-curl-invocation
Fix use of -q option in curl invocation
2020-03-09 16:53:12 -07:00
Jeff Bonhag
85f0fce57a Allow #provision_winrm to modify upload_path
We need to ensure that Windows files have an extension when provisioning
via WinRM.
2020-03-04 15:08:03 -08:00
Jeff Bonhag
df7c11a3a7 Fix issues with Windows SSH provisioner
Windows commands that run over SSH are wrapped in a script that writes a
special marker to the two output streams (stdout and stderr).  This
allows Vagrant to consume the output streams.

Unfortunately, this leads to a sort of chicken-and-egg problem where no
commands can be run before a wrapper script exists. For example, you
can't make a destination directory to upload the wrapper script without
first creating a wrapper script to make the directory. :)

This commit changes the behavior of the WinSSH communicator to assume
that the destination directory already exists for provisioning scripts.

It also moves the default `upload_path` from the shell provisioner
config so we can have OS-specific defaults.

Finally, it introduces a Windows-specific #upload method which will
properly use a Windows path separator on a non-Windows host.
2020-03-04 15:08:03 -08:00
Jeff Bonhag
08c3c741fe
Fix #11396: Use sudo to detect if systemd in use (#11398)
This change allows the vagrant user to see the systemd process in the
event that the hidepid mount option is enabled.

Also adds sudo: true to other tests that use `systemd?`
2020-02-14 12:10:59 -05:00
Brian Cain
00b47a285e
Ensure decimal points are respected for numeric conversions 2020-02-10 12:58:11 -08:00
Dmitri Vereshchagin
8befc12830 Fix use of -q option in curl invocation
curl ignores -q if it's not the first option.  Thus, prior to this
change, curl configuration file is used while performing HEAD request.
2020-02-03 00:00:36 +03:00
Jeff Bonhag
ade076cabb
Fixes #11236: Windows port detection (#11244)
This reverts commit 81553263ab812a7fd0a2ab0f627bee139ad6397c.

This fixes a regression with Windows port detection which led to port
collisions not being fixed on `vagrant up`.

PR #8517 changed `IsPortOpen#is_port_open?` to rescue
Errno::EADDRNOTAVAIL, but when we merged it into master, there was code
in `HandleForwardedPortCollisions#port_check` that depended on that
error bubbling up.
2019-12-19 14:46:13 -05:00
Brian Cain
cd98a8bf64
Include unit test for numeric class 2019-11-22 14:40:23 -08:00
Brian Cain
44c6f655be
Fixes #11179: Ensure Vagrant::Errors are loaded in file_checksum util
Prior to this commit, the file_checksum class used the `Vagrant::Errors`
class as if it were apart of the Vagrant module. However, since the
file_checksum class is an interface and not part of the Vagrant module,
it doesn't have access to that Error class like other Vagrant modules.
This commit fixes that by ensuring the `"vagrant/errors"` class is
loaded, and that the proper namespace is used.
2019-11-07 09:22:17 -08:00
Chris Roberts
04a1bb58f3 Add coverage on new behavior of FileChecksum 2019-10-08 11:23:48 -07:00
Chris Roberts
0bce1e6307 Update tests for checksum and filechecksum 2019-10-08 11:23:48 -07:00
Chris Roberts
7fb81bcea1 Add support for other checksum types 2019-10-08 11:23:48 -07:00
Chris Roberts
f5f89f72b7
Merge pull request #10889 from chrisroberts/f-local-plugins-boxfile
Support loading plugin information from nested Vagrantfiles
2019-06-05 13:56:29 -07:00
Chris Roberts
50c4464d44 Support loading plugin information from nested Vagrantfiles
Since plugin installation happens when the environment is first
initialized, attempt to determine the provider in use and load
any box provided Vagrantfiles to include any plugin configuration
they may include.
2019-06-04 10:07:02 -07:00
Chris Roberts
e7e8a39c55 Stub the ssh path used for exec
Since a full path to the ssh executable is being used and is expected
at a specific location, default to providing that location when looking
up the executable. This prevents errors from occurring when a host
system provides an `ssh` match at a different path.
2019-04-25 10:44:25 -07:00