Sha256: 4aa76aa8bd852400d4b396d1be1da6c1bd54e251743d34027bbf4ae8070397ca

Contents?: true

Size: 943 Bytes

Versions: 5

Compression:

Stored size: 943 Bytes

Contents

shared_examples 'provider/provisioner/pe_bootstrap/3x' do |provider, options|
  if !File.file?(options[:box])
    raise ArgumentError,
      "A box file must be downloaded for provider: #{provider}. Try: rake acceptance:setup"
  end

  include_context 'acceptance'

  let(:extra_env) do
    vars = options[:env_vars].dup
    vars['PE_BUILD_DOWNLOAD_ROOT'] = options[:archive_path]

    vars
  end

  before(:each) do
    # The skelton sets up a Vagrantfile which expects the OS under test to be
    # available as `box`.
    environment.skeleton('pe_build')
    assert_execute('vagrant', 'box', 'add', 'box', options[:box])
  end

  after(:each) do
    # Ensure any VMs that survived tests are cleaned up.
    assert_execute('vagrant', 'destroy', '--force', log: false)
  end

  context 'when installing PE 3.x' do
    it 'provisions with pe_build' do
      assert_execute('vagrant', 'up', "--provider=#{provider}", 'pe-3x')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-pe_build-0.12.0 acceptance/pe_build/pe_bootstrap_3x_spec.rb
vagrant-pe_build-0.11.0 acceptance/pe_build/pe_bootstrap_3x_spec.rb
vagrant-pe_build-0.10.4 acceptance/pe_build/pe_bootstrap_3x_spec.rb
vagrant-pe_build-0.10.3 acceptance/pe_build/pe_bootstrap_3x_spec.rb
vagrant-pe_build-0.10.2 acceptance/pe_build/pe_bootstrap_3x_spec.rb