Sha256: 9a1e230b8255bafb152d061d080e340d28ce5f75ab2fa0f02fc73f5c6a647a9c

Contents?: true

Size: 1.22 KB

Versions: 33

Compression:

Stored size: 1.22 KB

Contents

require 'vagrant-spec/acceptance/output'

module Vagrant
  module Spec
    OutputTester[:no_archives] = lambda do |text|
      text =~ /No PE versions available/
    end

    OutputTester[:pe_available] = lambda do |text|
      text =~ /puppet-enterprise-\d+\.\d\.\d-el-6-x86_64\.tar\.gz/
    end
  end
end


describe 'vagrant CLI: pe-build', component: 'cli/pe-build' do
  include_context 'acceptance'

  let(:options) { config.providers.values.first }

  let(:webserver_port) { 3838 }
  let(:webserver_path) { options[:archive_path] }
  let(:download_url) { "http://localhost:#{webserver_port}" }

  include_context 'webserver'

  before(:each) do
    environment.skeleton('pe_build')
  end

  it 'can download archives from remote servers' do
    result = execute('vagrant', 'pe-build', 'list')
    expect(result).to exit_with(0)
    expect(result.stdout).to match_output(:no_archives)

    result = execute('vagrant', 'pe-build', 'copy',
      "--release=#{options[:pe_latest]}",
      "#{download_url}/puppet-enterprise-:version-el-6-x86_64.tar.gz")
    expect(result).to exit_with(0)

    result = execute('vagrant', 'pe-build', 'list')
    expect(result).to exit_with(0)
    expect(result.stdout).to match_output(:pe_available)
  end

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
vagrant-pe_build-0.17.12 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.11 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.10 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.9 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.8 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.7 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.6 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.5 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.4 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.3 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.2 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.1 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.17.0 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.16.0 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.6 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.5 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.4 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.3 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.1 acceptance/pe_build/pe_build_cli_spec.rb
vagrant-pe_build-0.15.0 acceptance/pe_build/pe_build_cli_spec.rb