This commit attempts to uniquely identify the temporary files and
directories that are created during test runs. Where it was a quick
fix, this commit also removes the temporary files and directories.
There are still a ton of temporary files due to calls to
.isolated_environment in the tests without an easy API an easy way
to provide a closer to that function.
With this change, the `Vagrant::plugins_enabled?` is now false when the
embedded Bundler is not available.
Resolve the broken RSpec unit tests after
479323f1e8.
Previously, we required a host-only interface with a static IP for NFS
to work in VirtualBox, because we needed access to the guest's IP in
order to properly configure mount commands.
After boot, VirtualBox exposes the IP addresses of a guest's network
adapters via the "guestproperty" interface.
This adds support for reading VirtualBox guest properties to the
VirtualBox driver and utilizes that support to prepare NFS settings,
which removes the necessity for a static IP for NFS to work.
In this commit we also start building out scaffolding for unit testing
vbox actions and drivers.
Test plan:
- Prepare a Vagrantfile with the following:
* private network with type: :dhcp
* synced folder with nfs: true
- Boot a VM from this Vagrantfile using the virtualbox provider
- Machine should boot successfully with working synced folder
there's been a lot of churn around this code, so i figure it was worth
trying to clean it up.
- the methods were doing a lot, so make them into template methods with
one helper per step
- spread out /etc/hosts regexp into a couple of helper variables for
clarity
- remove handling for broken hostname implementations (like basing all
of the checks on name.split('.')[0]), since it seems reasonable to
remove code dedicated only to handling broken boxes
- DRY up the shared code between debian/ubuntu implementations, which
clarifies the differences as well
- add unit tests around the behavior; this will help us in the future
to separate flaws in our understanding from flaws in implementation
- includes a new DummyCommunicator in tests which should be useful in
supporting additional unit testing of this kind
- manually tested this on squeeze, wheezy, precise, quantal, raring,
and saucy successfully.
handles the issue in #2333
Before we were manually going over every plugin and getting each piece,
all over the place. Now we have a central manager that will give us all
the pieces we want. There is still some cleanup to do here but this is
much better overall.
This is the beginning of the new box internals. The basic idea is that
the new box has a new field: provider. The provider will describe what
provider that box was built with and what provider it is made to work
with.
Before, the tempfile "f" could be GC'd before the path was used,
resulting in failed tests because when it is GC'd the tempfile is
removed. We now store the tempfile in an instance variable so that it
isn't even available for GC until after the test is finished running.
Tests before were picking up a Vagrantfile in the Vagrant source
directory, which can cause some funny failures. This ensures that each
test run will actually establish a new temporary CWD so that a
Vagrantfile is hopefully never found.
Config::Loader will be the new class responsible for loading configuration
and replaces the previous dual-role "Vagrant::Config" played. While this
commit is very early-stage, once this new architecture is flushed out, it
will make loading, using, and extending configuration much easier and cleaner.
Additionally, I believe this will help post Vagrant 1.0 if multi-language
configuration is implemented.