49 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7c5d118e0d Use Dir.mktmpdir for tests more 2013-02-26 11:32:44 -08:00
Mitchell Hashimoto
c9d9bf679b Get rid of a pending test 2013-02-26 11:30:51 -08:00
Mitchell Hashimoto
803269f729 Test to make sure hooks return the action runner result 2013-02-24 18:00:01 -08:00
Mitchell Hashimoto
499d1ff8bf VAGRANT_VAGRANTFILE env var to specify alternate filename for Vfile 2013-02-23 12:07:23 -08:00
Mitchell Hashimoto
46db50680b environment_unload hook 2013-02-22 13:54:28 -08:00
Mitchell Hashimoto
3c343c0623 Environment#hook allows hooks to be run at arbitrary points 2013-02-22 12:22:10 -08:00
Mitchell Hashimoto
7eec127704 Support refreshing the machine cache 2013-01-30 10:37:40 -08:00
Mitchell Hashimoto
e66c5066e4 Plugin configuration can have scopes now, ex. provider 2013-01-13 12:38:17 -08:00
Mitchell Hashimoto
a30a92bb4f active_machines should return name as a symbol 2012-12-30 11:51:22 -10:00
Mitchell Hashimoto
4c46091746 Environment#primary_machine_name and use it for with_target_vms
This makes the single-provider and default provider semantics work with
primary VMs.
2012-12-30 11:12:56 -10:00
Mitchell Hashimoto
9257fe3d98 Environment#active_machines
This returns a list of active machines for the environment. An active
machine is a machine that at one point was created by Vagrant.
2012-12-27 19:28:05 -10:00
Mitchell Hashimoto
4e649cc987 Upgrade V1-style dotfile to V2
See the code and comments for details on how this is done. As usual, we
are very careful about this so as not to inadvertently destruct real
user data.
2012-12-26 22:41:42 -08:00
Mitchell Hashimoto
cd969e1e05 Remove the dotfile_name configuration option.
The dotfile is gone now so the configuration option is obselete
2012-12-26 21:45:24 -08:00
Mitchell Hashimoto
cc18492c7a Local data path introduced
The local data path is set to the `ROOT_DIR/.vagrant` by default and is
a directory where Vagrant can store environment-local state. This can be
overriden on a per-Environment basis using the `local_data_path`
option.
2012-12-26 21:45:23 -08:00
Mitchell Hashimoto
6478139cee Move config.vm.customize to VirtualBox specific option 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
a6e0d3908f Create a "dummy" provider for tests 2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
ac7958a43b Environment#primary_machine takes a provider argument. Use it. 2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
128c06e78d Environment#default_provider 2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
819140bbc2 Don't error if box doesn't exist on load 2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
f2b91d26fd Load the configuration per machine, so that provider boxes work
Boxes are provider-specific, and we don't know the provider until
Environment#machine is called, so we need to build up the machine
configuration during this time.
2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
1559f7b7a7 Get rid of the old Environment#vms calls. Use #machine everywhere. 2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
2ef6ff10f0 Cache the machine objects created in Environment#machine.
Each machine and provider backing should be represented by only one
machine.
2012-11-07 22:08:06 -08:00
Mitchell Hashimoto
67855be77b Add the Environment#machine method
This will eventually replace the Environment#vms method. Because of the
introduction of providers, the environment doesn't know what the backing
of the machines will be (and they're _machines_ now, not _vms_).
Instead, users of Environment will now call `#machine` on the
environment to retrieve a machine with the given backing provider as it
needs it.
2012-11-07 21:45:09 -08:00
Mitchell Hashimoto
f52f8ecc97 Get tests passing again, use V2 config in tests. 2012-11-07 20:06:55 -08:00
Mitchell Hashimoto
1cdd69bc91 All tests passing 2012-08-19 19:17:19 -07:00
Mitchell Hashimoto
5eed3b8417 Building up the destroy action again using new provider API.
This shows me moving the built-in middleware sequences to the provider
and how I'm organizing all that.
2012-07-26 22:39:27 -07:00
Mitchell Hashimoto
623ecb3e3d Environment attempts to upgrade box on config load.
If a V1 box is encountered when Vagrant loads the configuration, then it
will be upgraded on the fly.
2012-07-11 18:36:22 -07:00
Mitchell Hashimoto
da15105a8f Make Box2 the new Box
This involved defaulting all box searching at the moment to VirtualBox.
Additionally, box upgrading is not yet handled. This needs to be done at
some point.
2012-07-11 18:36:21 -07:00
Mitchell Hashimoto
37c54c7b20 Use a temporary directory for the VAGRANT_CWD when running tests
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.
2012-06-23 23:56:39 -07:00
Mitchell Hashimoto
f8fa859b5f Raise an error if the CWD is incorrect 2012-03-08 16:57:17 -08:00
Mitchell Hashimoto
6969f791ad VAGRANT_CWD can be set to set the CWD of vagrant. 2012-03-08 16:45:19 -08:00
Mitchell Hashimoto
ce00a56ecb Even with a custom vagrantfile name, use defaults [GH-778] 2012-03-08 13:24:04 -08:00
Mitchell Hashimoto
2c823e98bd Fix crashing bug with primary_vm on Environment 2012-02-24 10:27:34 -08:00
Mitchell Hashimoto
ef37f692bd Revert the check for duplicate Vagrantfiles.
This is just tricky with case sensitive/insensitive file systems.
Reverting since it doesn't seem worth it.
2012-01-08 23:15:18 -08:00
Mitchell Hashimoto
4f30a834d0 Tests for multivagrantfile being found 2012-01-08 23:04:23 -08:00
Mitchell Hashimoto
e201d9cacf Rename action registry to just Vagrant::Registry 2011-12-11 18:22:06 -08:00
Mitchell Hashimoto
05ae297fd2 Copy insecure private key to user owned directory [GH-580] 2011-12-11 16:32:25 -08:00
Mitchell Hashimoto
d9e2c8b788 Raise a nice error if home directory is not accessible 2011-12-10 17:14:07 -08:00
Mitchell Hashimoto
3c8261f4ac Add :ui to the globals for the action runner 2011-12-09 14:50:42 -08:00
Mitchell Hashimoto
bbb8f0ac2c Integrate new action runner/registry into Vagrant::Environment 2011-12-09 14:39:39 -08:00
Mitchell Hashimoto
8801bc7b1b Starting to revamp BoxCollection to not depend on env 2011-12-04 11:39:44 -08:00
Mitchell Hashimoto
e2977e8948 Make VM names symbols again, since they're accessed often. 2011-12-03 19:33:44 -08:00
Mitchell Hashimoto
1921ce17e8 Propery load box configuration 2011-12-03 19:17:08 -08:00
Mitchell Hashimoto
99982fb26e VM-specific configuration now works. 2011-12-03 19:05:50 -08:00
Mitchell Hashimoto
73a672cff1 load_config! is kind of working again.
Specifically: Global configuration load appears to be working. More
unit tests should reveal if proper VM configuration is loading.
2011-12-03 18:31:17 -08:00
Mitchell Hashimoto
1355487a04 Environment UI class can now be set through the environment init 2011-12-03 16:07:34 -08:00
Mitchell Hashimoto
fe442faefa Move unit tests into the unit_legacy folder 2011-12-03 15:44:08 -08:00
Mitchell Hashimoto
c37f16b754 Remove final logger reference 2011-12-01 21:56:56 -08:00
Mitchell Hashimoto
ce5d989384 Moving unit tests to test/unit 2011-08-28 23:10:32 -07:00