]> gitweb.fluxo.info Git - puppet-mailalias_core.git/commitdiff
(PA-6139) Drop beaker-puppet_install_helper gem in mailalias-core module
authorAmit Karsale <amit.karsale@perforce.com>
Thu, 25 Jul 2024 17:53:08 +0000 (23:23 +0530)
committerAmit Karsale <amit.karsale@perforce.com>
Thu, 25 Jul 2024 17:53:08 +0000 (23:23 +0530)
.sync.yml
Gemfile
spec/spec_helper_acceptance.rb

index 268c44c3d420fc358205da8dd354b712e91dd082..d2598a62b443a36bbb61345285285827b6466d04 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -21,7 +21,6 @@ Gemfile:
       - gem: async
         version: '~> 1'
       - gem: beaker-module_install_helper
-      - gem: beaker-puppet_install_helper
       - gem: nokogiri
     ":system_tests":
       - gem: voxpupuli-acceptance
diff --git a/Gemfile b/Gemfile
index 8f9552d36b3a58db73004a31156777d5b85e86a0..a31fccb6b98768868a06358a1df41a4e71e236e4 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -41,7 +41,6 @@ group :development do
   gem "beaker-puppet", *location_for(ENV['BEAKER_PUPPET_VERSION'] || '~> 4.0') if Gem::Requirement.create('< 3.2.0').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
   gem "async", '~> 1',                                                         require: false
   gem "beaker-module_install_helper",                                          require: false
-  gem "beaker-puppet_install_helper",                                          require: false
   gem "nokogiri",                                                              require: false
 end
 group :development, :release_prep do
index 633ed4b9c85407aebac42bf6ad166a90206cbe3a..75368f3b19e0f3a753a4b82430a4136db8cac89f 100644 (file)
@@ -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' }