Skip to content

Commit 2f037fd

Browse files
authored
Merge pull request #76 from amitkarsale/PA-6139
(PA-6139) Drop beaker-puppet_install_helper gem in cron-core module
2 parents ac1e8b6 + 055991d commit 2f037fd

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.sync.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Gemfile:
2828
- gem: async
2929
version: '~> 1'
3030
- gem: beaker-module_install_helper
31-
- gem: beaker-puppet_install_helper
3231
- gem: nokogiri
3332
":system_tests":
3433
- gem: voxpupuli-acceptance

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ group :development do
4141
gem "beaker-puppet", *location_for(ENV['BEAKER_PUPPET_VERSION'] || '~> 4') if Gem::Requirement.create('< 3.2.0').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
4242
gem "async", '~> 1', require: false
4343
gem "beaker-module_install_helper", require: false
44-
gem "beaker-puppet_install_helper", require: false
4544
gem "nokogiri", require: false
4645
end
4746
group :development, :release_prep do

spec/spec_helper_acceptance.rb

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'beaker-rspec'
22
require 'beaker-puppet'
33
require 'beaker/module_install_helper'
4-
require 'beaker/puppet_install_helper'
54
require 'voxpupuli/acceptance/spec_helper_acceptance'
65

76
$LOAD_PATH << File.join(__dir__, 'acceptance/lib')
@@ -99,6 +98,30 @@ def user_manifest(username, params = {})
9998
RSpec.configure do |c|
10099
c.before :suite do
101100
unless ENV['BEAKER_provision'] == 'no'
101+
def run_puppet_install_helper
102+
return unless ENV['PUPPET_INSTALL_TYPE'] == 'agent'
103+
if ENV['BEAKER_PUPPET_COLLECTION'].match? %r{/-nightly$/}
104+
# Workaround for RE-10734
105+
options[:release_apt_repo_url] = 'http://nightlies.puppet.com/apt'
106+
options[:win_download_url] = 'http://nightlies.puppet.com/downloads/windows'
107+
options[:mac_download_url] = 'http://nightlies.puppet.com/downloads/mac'
108+
end
109+
110+
agent_sha = ENV['BEAKER_PUPPET_AGENT_SHA'] || ENV['PUPPET_AGENT_SHA']
111+
if agent_sha.nil? || agent_sha.empty?
112+
install_puppet_agent_on(hosts, options.merge(version: version))
113+
else
114+
# If we have a development sha, assume we're testing internally
115+
dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'
116+
install_from_build_data_url('puppet-agent', "#{dev_builds_url}/puppet-agent/#{agent_sha}/artifacts/#{agent_sha}.yaml", hosts)
117+
end
118+
119+
# XXX install_puppet_agent_on() will only add_aio_defaults_on when the
120+
# nodeset type == 'aio', but we don't want to depend on that.
121+
add_aio_defaults_on(hosts)
122+
add_puppet_paths_on(hosts)
123+
end
124+
102125
hosts.each { |host| host[:type] = 'aio' }
103126
run_puppet_install_helper
104127
install_module_on(hosts_as('default'))

0 commit comments

Comments
 (0)