Sha256: 6ed317f365f65054f7b9651b55b798a9a2200d0d3e20cb1156ac101335697557

Contents?: true

Size: 794 Bytes

Versions: 3

Compression:

Stored size: 794 Bytes

Contents

# This tests that a preemptible instance can be brought up correctly
shared_examples 'provider/preemptible' do |provider, options|
  if !options[:box]
    raise ArgumentError,
          "box option must be specified for provider: #{provider}"
  end

  include_context 'acceptance'

  before do
    environment.skeleton('preemptible')
    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 machine with preemptible option' do
    status("Test: machine is running after up")
    result = execute("vagrant", "ssh", "-c", "echo foo")
    expect(result).to exit_with(0)
    expect(result.stdout).to match(/foo\n$/)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-google-0.2.1 test/acceptance/provider/preemptible_spec.rb
vagrant-google-0.2.0 test/acceptance/provider/preemptible_spec.rb
vagrant-google-0.2.0.rc1 test/acceptance/provider/preemptible_spec.rb