vagrant/test/unit
Seth Vargo d77ad5c941
guests/arch: Configure networks in one command
This commit updates the procedure for configuring arch networks to occur
in a single command. Previously, each network was configured
independently. If, for some reason, one of the networks destroyed the
SSH connection, the box would be irrecoverable. This commit does not
alleviate that behavior, but attempts to mitigate it by running all
network-related configuration commands in a single communicator (SSH)
session.

The new procedure looks like this:

1. Upload a temp file to /tmp/vagrant-network-id... for each interface
  on the guest.
2. Compile a commands array (of bash) to execute after all network
  configurations have been uploaded.
3. Concatenate all the commands together in a single communicator
  session.

This was tested against `terrywant/archlinux` using the following Vagrantfile:

```ruby
Vagrant.configure(2) do |config|
  config.vm.box = "terrywang/archlinux"
  config.vm.hostname = "banana-ramama.example.com"

  config.vm.network "private_network", type: "dhcp"

  config.vm.network "private_network", ip: "33.33.33.10"

  config.vm.provision "file", source: "Vagrantfile", destination: "/tmp/vf"
  config.vm.provision "shell", inline: "echo hi"
end
```
2016-06-06 11:58:24 -04:00
..
plugins guests/arch: Configure networks in one command 2016-06-06 11:58:24 -04:00
support Add unique names to all tmpdir and tempfile calls in tests + cleanup 2016-05-28 23:22:34 -04:00
templates/guests Added basic unit test 2016-04-30 13:22:52 -07:00
vagrant Merge pull request #7359 from mitchellh/sethvargo/cache_platform 2016-05-31 11:03:46 -04:00
base.rb Add unique names to all tmpdir and tempfile calls in tests + cleanup 2016-05-28 23:22:34 -04:00
vagrant_test.rb Add a function to get to the "original" environment with Vagrant 2015-07-09 12:34:04 -06:00