1 require 'beaker-rspec/spec_helper'
2 require 'beaker-rspec/helpers/serverspec'
3 require 'acceptance/specinfra_stubs'
5 unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
6 # This will install the latest available package on el and deb based
7 # systems fail on windows and osx, and install via gem on other *nixes
8 foss_opts = {:default_action => 'gem_install'}
10 if default.is_pe?; then
13 install_puppet(foss_opts);
17 on hosts, "mkdir -p #{host['distmoduledir']}"
18 if host['platform'] =~ /sles-1/i || host['platform'] =~ /solaris-1/i
22 command => "wget -P /root/ https://forgeapi.puppetlabs.com/v3/files/puppetlabs-stdlib-4.5.1.tar.gz --no-check-certificate",
23 path => ['/opt/csw/bin/','/usr/bin/']
26 apply_manifest_on(host, get_stdlib)
27 # have to use force otherwise it checks ssl cert even though it is a local file
28 on host, puppet('module install /root/puppetlabs-stdlib-4.5.1.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
29 elsif host['platform'] =~ /windows/i
30 on host, shell('curl -k -o c:/puppetlabs-stdlib-4.5.1.tar.gz https://forgeapi.puppetlabs.com/v3/files/puppetlabs-stdlib-4.5.1.tar.gz')
31 on host, puppet('module install c:/puppetlabs-stdlib-4.5.1.tar.gz --force --ignore-dependencies'), {:acceptable_exit_codes => [0, 1]}
33 on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
38 RSpec.configure do |c|
40 proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
42 # Readable test descriptions
43 c.formatter = :documentation
45 # Configure all nodes in nodeset
48 copy_module_to(host, :source => proj_root, :module_name => 'concat')
53 shell('mkdir -p /tmp/concat')
56 shell('rm -rf /tmp/concat /var/lib/puppet/concat')
59 c.treat_symbols_as_metadata_keys_with_true_values = true