|
1 | 1 | require 'beaker-rspec'
|
2 | 2 | require 'beaker-puppet'
|
3 | 3 | require 'beaker/module_install_helper'
|
4 |
| -require 'beaker/puppet_install_helper' |
5 | 4 | require 'voxpupuli/acceptance/spec_helper_acceptance'
|
6 | 5 |
|
7 | 6 | RSpec.configure do |c|
|
|
42 | 41 | -----END CERTIFICATE-----
|
43 | 42 | EOM
|
44 | 43 |
|
| 44 | + def run_puppet_install_helper |
| 45 | + return unless ENV['PUPPET_INSTALL_TYPE'] == 'agent' |
| 46 | + if ENV['BEAKER_PUPPET_COLLECTION'].match? %r{/-nightly$/} |
| 47 | + # Workaround for RE-10734 |
| 48 | + options[:release_apt_repo_url] = 'http://nightlies.puppet.com/apt' |
| 49 | + options[:win_download_url] = 'http://nightlies.puppet.com/downloads/windows' |
| 50 | + options[:mac_download_url] = 'http://nightlies.puppet.com/downloads/mac' |
| 51 | + end |
| 52 | + |
| 53 | + agent_sha = ENV['BEAKER_PUPPET_AGENT_SHA'] || ENV['PUPPET_AGENT_SHA'] |
| 54 | + if agent_sha.nil? || agent_sha.empty? |
| 55 | + install_puppet_agent_on(hosts, options.merge(version: version)) |
| 56 | + else |
| 57 | + # If we have a development sha, assume we're testing internally |
| 58 | + dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net' |
| 59 | + install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{agent_sha}/artifacts/#{agent_sha}.yaml", hosts) |
| 60 | + end |
| 61 | + |
| 62 | + # XXX install_puppet_agent_on() will only add_aio_defaults_on when the |
| 63 | + # nodeset type == 'aio', but we don't want to depend on that. |
| 64 | + add_aio_defaults_on(hosts) |
| 65 | + add_puppet_paths_on(hosts) |
| 66 | + end |
| 67 | + |
45 | 68 | # Until solaris gets new image we need to add to the cert chain on solaris, call a beaker-puppet setup script to handle this
|
46 | 69 | hosts.each do |host|
|
47 | 70 | next unless host.platform.match? %r{solaris-11(\.2)?-(i386|sparc)}
|
|
0 commit comments