191 Commits

Author SHA1 Message Date
Chris Roberts
6e13612111 Add test coverage for architecture support 2023-09-14 16:15:03 -07:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
602d42bbc8 Add and update tests for insecure private keys
Updates existing test coverage to use insecure private key collection
and adds testing for behavior changes within the communicator and the
keypair utility.
2023-06-26 15:47:32 -07:00
Chris Roberts
d83bfc0d40 Perform best effort ssl revocation check on Windows
When performing a request via curl on Windows using schannel, ssl
certificate revocation checks does not handle verification failures
gracefully when an error is encountered that is unrelated to the actual
revocation of a certificate.

A new option is available to perform best effort revocation checks on
curl, so this is enabled by default on the Windows platform. A new
config option (`box_download_disable_ssl_revoke_best_effort`) has also
been added which can be optionally enabled to restore previous behavior
which results in a hard error if any error is encountered.
2023-06-20 16:37:00 -07:00
Chris Roberts
0a20379b1a Enable deprecated key type and host key algorithm
Recent versions of OpenSSH remove support of ssh-rsa key types and host
key algorithms from the default conection configuration. Set options to
enable them and provide a configuration option which can disable them if
required.
2023-05-22 17:09:47 -07:00
Chris Roberts
1f26256680 Release file lock before file deletion
When unlocking the file mutex utility always unlock the file prior to
deletion to ensure the file can be properly deleted.
2023-05-17 11:13:10 -07:00
sophia
4551b8b2ad Use file locks to avoid file existance checking race conditions 2023-02-22 14:28:00 -08:00
sophia
f153996b2d Add tests for mutex util module 2023-01-13 14:08:27 -08:00
Chris Roberts
2fe4056a7d Fix test using File.exists? to use non-deprecated name 2022-11-14 10:11:00 -08:00
Chris Roberts
c7ef689d86 Prevent trailing space character on user agent 2022-09-28 13:51:54 -07:00
Chris Roberts
bbd1404c1e
Merge pull request #12437 from chrisroberts/line-buf-shell-util
Line buffer utility and shell provisioner usage
2021-06-29 13:11:19 -07:00
Chris Roberts
9b232d0ff3 Add test coverage on line buffer util 2021-06-29 11:04:14 -07:00
Chris Roberts
3d0d0148e9 Update tests to use real UI instance
Replaces use of UI doubles within tests to use actual UI instance
    to ensure calls are passing parameters correctly.
2021-06-23 14:04:48 -07:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
Dan Čermák
b1ba47c52c
Mock the PowerShell.executable method in more tests
On *nix systems we might not have powershell installed and then finding
powershell.exe or pwsh.exe fails in some tests. If we instead mock
self.executable to return "powershell", then the tests pass and don't cause any
side effects.
2021-04-30 09:37:20 +02:00
Chris Roberts
5967a23fa0 Support pwsh executable name for powershell
This updates the powershell detection to look for the `pwsh` executable
    and use it when the powershell executable is not available.
2021-04-28 12:45:48 -07:00
sophia
220f346d2b Make shell script for loop shell agnostic 2021-02-22 12:36:54 -06:00
Chris Roberts
16dc9db76b Handle Errno::EALREADY exceptions on port checks
With WSL port checks can end up resulting in Errno::EALREADY being
raised. When encountered, assume port is unavailable.
2020-10-30 13:09:51 -07:00
Chris Roberts
78d309a09b Update cloud command to use refactored library implementation
This PR is dependent on the 2.1.0 release of the vagrant_cloud
library. It updates the `cloud` command to use the new interface
for interacting with the Vagrant Cloud API. It also adds support
for direct to backend storage uploads, and defaults to this
method.

Also included is a bit of cleanup refactoring, addition of method
documentation, and fixing up some small issues around custom username
usage within the internal client for authentication.
2020-10-30 09:26:07 -07:00
sophia
8a8eff130a Allow entity to support content disposition 2020-10-28 16:21:42 -05:00
sophia
799ebb32ed Add tests for mime util 2020-10-28 15:57:45 -05:00
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