|
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 | $LOAD_PATH << File.join(__dir__, 'acceptance/lib')
|
@@ -54,6 +53,30 @@ def solaris_agents
|
54 | 53 | -----END CERTIFICATE-----
|
55 | 54 | EOM
|
56 | 55 |
|
| 56 | + def run_puppet_install_helper |
| 57 | + return unless ENV['PUPPET_INSTALL_TYPE'] == 'agent' |
| 58 | + if ENV['BEAKER_PUPPET_COLLECTION'].match? %r{/-nightly$/} |
| 59 | + # Workaround for RE-10734 |
| 60 | + options[:release_apt_repo_url] = 'http://nightlies.puppet.com/apt' |
| 61 | + options[:win_download_url] = 'http://nightlies.puppet.com/downloads/windows' |
| 62 | + options[:mac_download_url] = 'http://nightlies.puppet.com/downloads/mac' |
| 63 | + end |
| 64 | + |
| 65 | + agent_sha = ENV['BEAKER_PUPPET_AGENT_SHA'] || ENV['PUPPET_AGENT_SHA'] |
| 66 | + if agent_sha.nil? || agent_sha.empty? |
| 67 | + install_puppet_agent_on(hosts, options.merge(version: version)) |
| 68 | + else |
| 69 | + # If we have a development sha, assume we're testing internally |
| 70 | + dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net' |
| 71 | + install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{agent_sha}/artifacts/#{agent_sha}.yaml", hosts) |
| 72 | + end |
| 73 | + |
| 74 | + # XXX install_puppet_agent_on() will only add_aio_defaults_on when the |
| 75 | + # nodeset type == 'aio', but we don't want to depend on that. |
| 76 | + add_aio_defaults_on(hosts) |
| 77 | + add_puppet_paths_on(hosts) |
| 78 | + end |
| 79 | + |
57 | 80 | # Until solaris gets new image we need to add to the cert chain on solaris, call a beaker-puppet setup script to handle this
|
58 | 81 | hosts.each do |host|
|
59 | 82 | next unless host.platform.match? %r{solaris-11(\.2)?-(i386|sparc)}
|
|
0 commit comments