Sha256: c273d7446527fa0be9b946ed008a393898d0b73ef4be4031f6e5b7a0e9542039

Contents?: true

Size: 888 Bytes

Versions: 15

Compression:

Stored size: 888 Bytes

Contents

require File.expand_path("../../base", __FILE__)

require "net/http"
require "uri"

require "acceptance/support/network_tests"
require "acceptance/support/shared/command_examples"
require "support/tempdir"

describe "vagrant host only networking" do
  include Acceptance::NetworkTests

  include_context "acceptance"

  def initialize_environment(env=nil)
    require_box("default")

    env ||= environment
    env.execute("vagrant", "box", "add", "base", box_path("default")).should succeed
  end

  it "creates a network with a static IP" do
    initialize_environment

    environment.workdir.join("Vagrantfile").open("w+") do |f|
      f.puts(<<VFILE)
Vagrant::Config.run do |config|
  config.vm.box = "base"
  config.vm.network :hostonly, "33.33.33.10"
end
VFILE
    end

    assert_execute("vagrant", "up")
    assert_host_to_vm_network("http://33.33.33.10:8000/", 8000)
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
vagrantup-0.9.7 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.6 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.5 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.4 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.3 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.2 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.1 test/acceptance/networking/host_only_test.rb
vagrantup-0.9.0 test/acceptance/networking/host_only_test.rb
vagrant-0.9.7 test/acceptance/networking/host_only_test.rb
vagrant-0.9.5 test/acceptance/networking/host_only_test.rb
vagrant-0.9.4 test/acceptance/networking/host_only_test.rb
vagrant-0.9.3 test/acceptance/networking/host_only_test.rb
vagrant-0.9.2 test/acceptance/networking/host_only_test.rb
vagrant-0.9.1 test/acceptance/networking/host_only_test.rb
vagrant-0.9.0 test/acceptance/networking/host_only_test.rb