Commit Graph

2972 Commits

Author SHA1 Message Date
Brian Cain c7b1f8821d
Try to mock up docker version subprocess result in test 2019-09-11 09:36:11 -07:00
Brian Cain d4002aa74d
Add vagrantfile mock to iso_env machine 2019-09-11 09:17:14 -07:00
Brian Cain e820b5df8e
Add vagrantfile double for environment class 2019-09-11 09:01:35 -07:00
Brian Cain f14cf09af6
Add allow for docker driver execute method 2019-09-11 08:37:07 -07:00
Brian Cain 21db2db9ac
Add machine config to machine double for rspec tests
This commit mocks up the docker machines test config so that it doesn't
actually invoke the docker driver in circle-ci
2019-09-11 08:09:26 -07:00
Brian Cain ebe1f3f1c9
Remove virtualbox context from docker tests 2019-09-11 07:46:40 -07:00
Anders Kaseorg 5b4dcf9443
providers/docker: Fix usability check
In commit 7980178d19 (#10879) I added a
`usable?` class method to `VagrantPlugins::DockerProvider::Provider`.
However, commit 34e53a5a4b (#10890)
incorrectly changed it to an instance method.  This rendered it
ineffective because it’s called on the class, not an instance.  Change
it back to a class method.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-09-10 15:10:43 -07:00
Brian Cain 8abc0cc90c
Merge pull request #11013 from dcermak/suse_ipv6_support
Add ipv6 network config templates for SUSE based distributions
2019-09-06 11:08:37 -07:00
Brian Cain f74239bed9
Merge pull request #11043 from briancain/provisioner-enhancements
Introduce new Provisioner options: before and after
2019-09-06 08:52:40 -07:00
Brian Cain f9b60ba603
Merge pull request #11052 from briancain/add-skip-used-boxes-with-force-prune
Fixes #10908: Preserve in-use boxes when force flag is used with prune
2019-09-06 08:49:40 -07:00
Brian Cain 09af983caa
Fixes #11051: Only use host vm if specified
Prior to this commit, the docker login action assumed that if there was
a password to authenticate with, Vagrant was using a host vm to run
docker. This is likely due to some legacy decisions with how Vagrant
used to manage running docker. This commit fixes that by only grabbing a
host_vm lock if the host_vm is actually in use, otherwise login
normally.
2019-09-05 14:54:40 -07:00
Brian Cain e19f54457d
Fixes #10908: Preserve in-use boxes when force flag is used with prune
Prior to this commit, `vagrant box prune --force` would not prompt a
user to prune Vagrant boxes, even if that box was in use. There was no
way to prune boxes, ignore the prompt, but keep in-use boxes. This
commit adds a new flag that can be combined with `--force`, that will
keep in-use boxes but prune older boxes without prompting the user.
2019-09-04 15:54:11 -07:00
Brian Cain e56d2581ee
Add before/after all tests 2019-08-27 14:36:36 -07:00
Brian Cain 271d427c57
Fix bug in :each provisioner sorting
Ensure each provisioners are properly inserted into the final
provisioner array
2019-08-27 14:28:06 -07:00
Ladar Levison 5fb9edd67b Functional/working unit tests for the alt linux guest plugin change hostname capability. 2019-08-27 23:00:36 +05:30
Ladar Levison 243ae0f368 Added service command to alt guest test. 2019-08-27 21:07:58 +05:30
Ladar Levison 0671843ec0 Initial alt guest unit test attempt. 2019-08-27 20:31:12 +05:30
Brian Cain c189e4d255
Redo how each provisioners are sorted 2019-08-26 16:05:02 -07:00
Brian Cain 28ef368881
Begin to add tests for mixin provisioner 2019-08-26 12:03:36 -07:00
Dan Čermák eb9b478951
Add ipv6 network config templates for SUSE based distributions 2019-08-09 17:23:46 +02:00
Tim Schumacher a7f09f010c alpine: Convert nfs_client capability to seperate commands
The workaround for the broken repository should be safe to be removed,
since the last affected Alpine version (<=3.3) EOL'd in November of 2017.

The remaining important commands can be split out into seperate calls
of sudo(), which removes the need for manual exit-code checking
(since it aborts by itself when a command fails) and makes the code
easier to handle in general.
2019-07-26 08:31:12 +02:00
Tim Schumacher 29362d8af4 alpine: Wire up tests 2019-07-18 03:36:50 +02:00
Tim Schumacher fbffb41fc4 guests: Add unmodified alpine support plugin from maier
This has been available as `vagrant-alpine` in the plugin
repository so far.
2019-07-18 03:35:40 +02:00
Chris Roberts 7fbe8bcabc Fix plugin discovery loading when no data directory is available
If the local data directory is unavailable, there will be no local
file to use within the plugin manager. Check for local file before
returning result, otherwise just return an empty hash.
2019-06-21 11:15:39 -07:00
Chris Roberts 7c6b2963c3
Merge pull request #10911 from chrisroberts/f-plugin-loading
Support loading machine configuration without provider validation
2019-06-20 11:23:10 -07:00
Chris Roberts fef8316b3c
Merge pull request #10915 from laozc/fix-gp
Fix provider name not work when specified
2019-06-20 11:22:01 -07:00
Brian Cain 181e356a23
Merge pull request #10917 from briancain/chef-install-check-update
Fixes #10912: Update chef install check for guests
2019-06-20 08:11:50 -07:00
Chris Roberts 5e0f64d654 Only run tests that require bsdtar if it is available 2019-06-19 15:29:55 -07:00
Chris Roberts 2f2d1f9cb2 Fix docker test to not call docker executable 2019-06-19 11:59:09 -07:00
Brian Cain d55f8d3496
Fixes #10912: Update chef install check for guests
Prior to this commit, the chef_installed capability was looking for a
string that has recently changed in newer versions of chef. This commit
fixes that by instead just looking for the right version that was
configured for the chef client, rather than the specific string that
could change again in the future.
2019-06-17 11:02:57 -07:00
Brian Cain 75d42fed9d
Merge pull request #10902 from briancain/fixup-rsync-listener
Fixes #10895: Use relative paths to machines folder path for Listener
2019-06-17 08:20:37 -07:00
Zhongcheng Lao caae214bf7 Fix provider name not work when specified
Provider name should be symbol in guess_provider.
2019-06-17 08:22:50 +08:00
Chris Roberts 9bae0a7094 Support loading machine configuration without provider validation
Allow Vagrantfile#machine_config to load properly when the requested
provider may not be currently available. Update the Environment to
utilize this when searching for plugin information to properly allow
box provided Vagrantfiles to define required plugins.
2019-06-14 11:50:06 -07:00
Brian Cain 1b0148bc78
Fixes #10895: Use relative paths to machines folder path for Listener
Prior to this commit, the rsync helper expanded all exclude paths that
should be ignored to be full qualified and regexp escaped. However the
Listen gem expects these ignore paths to be relative to the path passed
into the listener, not a full path. This commit fixes that by using the
path given by the user for the `rsync__exclude` option
2019-06-11 14:58:42 -07:00
Brian Cain bf55e43460
Fixes #10869: Remove excludes if array is empty
Prior to this commit, if a user specified that their `rsync__excludes`
option was an empty array, Vagrant would treat that as if it included
options inside the array rather than ignoring it. This commit fixes that
by only adding the excludes option when it exists and is not empty.
2019-06-10 13:44:39 -07:00
Chris Roberts 2507b68045
Merge pull request #10891 from chrisroberts/f-trigger-multithread
Update trigger abort behavior when running parallel actions
2019-06-05 13:58:44 -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 bbf8f05d75
Merge pull request #10884 from GregJPreece/feature/10506-machine-readable-status
#10506 - Machine Readable Global-Status
2019-06-05 13:54:47 -07:00
Chris Roberts fd34ea657b Add test coverage on expected machine-readable output 2019-06-05 13:04:47 -07:00
Brian Cain fb80e8da9f
Merge pull request #10890 from briancain/add-usability-check-for-docker-plus-tests
Add usability check for docker plus tests
2019-06-05 07:58:23 -07:00
Greg J Preece b57d467fa2 Revert "Updating unit tests w/ UI message suppression"
This reverts commit f25427869c.
2019-06-04 20:58:46 -07:00
Chris Roberts 88c675694a Update trigger abort behavior when running parallel actions
When the provider supports parallel actions and actions are being
run in parallel, do not immediately kill the process on failure.
Instead terminate the action thread and log the exit code. Once
all running actions have completed, the process will then exit
with the stored exit code.
2019-06-04 16:40:59 -07:00
Brian Cain b8b2111700
Remove unnecessary test from virtualbox context 2019-06-04 14:56:31 -07:00
Brian Cain bb6913e6e8
Fixup virtualbox provider tests for Travis 2019-06-04 14:43:13 -07:00
Brian Cain 74c89e5ec1
Add virtualbox provider rspec tests 2019-06-04 14:14:06 -07:00
Brian Cain 34e53a5a4b
Add docker provider class test
This commit introduces aa provider_test class for the Docker provider
2019-06-04 13:24:07 -07:00
Chris Roberts 0cba5263ad
Merge pull request #10811 from chrisroberts/f-synced-folder-creds
Remove configuration information from SMB synced folder data
2019-06-04 11:33:33 -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
Anders Kaseorg 7980178d19 providers/docker: Add usability test
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-05-30 13:13:43 -07:00
Greg J Preece f25427869c Updating unit tests w/ UI message suppression 2019-05-30 09:17:30 -07:00