Sha256: de2ea99ef985310ae846461b0647d0df2558f3320530bf779fdf4de1ea80c77e

Contents?: true

Size: 1.03 KB

Versions: 21

Compression:

Stored size: 1.03 KB

Contents

# This tests that multiple instances can be brought up correctly
shared_examples 'provider/multi_instance' do |provider, options|
  unless options[:box]
    raise ArgumentError,
          "box option must be specified for provider: #{provider}"
  end

  include_context 'acceptance'

  before do
    environment.skeleton('multi_instance')
    assert_execute('vagrant', 'box', 'add', 'basic', options[:box])
    assert_execute('vagrant', 'up', "--provider=#{provider}")
  end

  after do
    assert_execute('vagrant', 'destroy', '--force')
  end

  it 'should bring up 2 machines in different zones' do
    status("Test: both machines are running after up")
    status("Test: machine1 is running after up")
    result1 = execute("vagrant", "ssh", "z1a", "-c", "echo foo")
    expect(result1).to exit_with(0)
    expect(result1.stdout).to match(/foo\n$/)
    status("Test: machine2 is running after up")
    result1 = execute("vagrant", "ssh", "z1b", "-c", "echo foo")
    expect(result1).to exit_with(0)
    expect(result1.stdout).to match(/foo\n$/)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
vagrant-google-2.7.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.6.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.5.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.4.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.4.0.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.3.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.3.0.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.2.1 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.2.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.2.0.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.1.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.0.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.0.0.rc1 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-2.0.0.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-1.0.0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-1.0.0.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-0.2.5 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-0.2.5.rc0 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-0.2.4 test/acceptance/provider/multi_instance_spec.rb
vagrant-google-0.2.3 test/acceptance/provider/multi_instance_spec.rb