aboutsummaryrefslogtreecommitdiff
path: root/spec/spec_helper_acceptance.rb
diff options
context:
space:
mode:
authorAria Li (she/her) <53382941+AriaXLi@users.noreply.github.com>2024-07-25 11:15:57 -0700
committerGitHub <noreply@github.com>2024-07-25 11:15:57 -0700
commitf7bbbe969c4d6de385b9e8b8faf5f309059e0275 (patch)
tree34a362cf9a9618f6eaa7621c414600499986d008 /spec/spec_helper_acceptance.rb
parenta26f3eacc2e522286325df3441c7f2640af5d31e (diff)
parent30721a09bee8abc1dad3c9adcff22649ab91709a (diff)
downloadpuppet-mailalias_core-f7bbbe969c4d6de385b9e8b8faf5f309059e0275.tar.gz
puppet-mailalias_core-f7bbbe969c4d6de385b9e8b8faf5f309059e0275.tar.bz2
Merge pull request #55 from amitkarsale/PA-6139
(PA-6139) Drop beaker-puppet_install_helper gem in mailalias-core module
Diffstat (limited to 'spec/spec_helper_acceptance.rb')
-rw-r--r--spec/spec_helper_acceptance.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index 633ed4b..75368f3 100644
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -2,7 +2,6 @@ require 'puppet'
require 'beaker-rspec'
require 'beaker-puppet'
require 'beaker/module_install_helper'
-require 'beaker/puppet_install_helper'
require 'voxpupuli/acceptance/spec_helper_acceptance'
$LOAD_PATH << File.join(__dir__, 'acceptance/lib')
@@ -16,6 +15,30 @@ def non_windows_agents
end
RSpec.configure do |c|
+ def run_puppet_install_helper
+ return unless ENV['PUPPET_INSTALL_TYPE'] == 'agent'
+ if ENV['BEAKER_PUPPET_COLLECTION'].match? %r{/-nightly$/}
+ # Workaround for RE-10734
+ options[:release_apt_repo_url] = 'http://nightlies.puppet.com/apt'
+ options[:win_download_url] = 'http://nightlies.puppet.com/downloads/windows'
+ options[:mac_download_url] = 'http://nightlies.puppet.com/downloads/mac'
+ end
+
+ agent_sha = ENV['BEAKER_PUPPET_AGENT_SHA'] || ENV['PUPPET_AGENT_SHA']
+ if agent_sha.nil? || agent_sha.empty?
+ install_puppet_agent_on(hosts, options.merge(version: version))
+ else
+ # If we have a development sha, assume we're testing internally
+ dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'
+ install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{agent_sha}/artifacts/#{agent_sha}.yaml", hosts)
+ end
+
+ # XXX install_puppet_agent_on() will only add_aio_defaults_on when the
+ # nodeset type == 'aio', but we don't want to depend on that.
+ add_aio_defaults_on(hosts)
+ add_puppet_paths_on(hosts)
+ end
+
c.before :suite do
unless ENV['BEAKER_provision'] == 'no'
hosts.each { |host| host[:type] = 'aio' }