aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Thorn <christopher.thorn@puppetlabs.com>2022-03-19 16:22:19 -0700
committerChristopher Thorn <christopher.thorn@puppetlabs.com>2022-03-19 16:42:33 -0700
commit48b3e2154f63520a0696932024bef12ab5bdac0b (patch)
treeea84924362484b151c77c58ff5187888a3bac987
parent681db673d61cf7980abbf1b422d19ec8aa24c35f (diff)
downloadpuppet-augeas_core-48b3e2154f63520a0696932024bef12ab5bdac0b.tar.gz
puppet-augeas_core-48b3e2154f63520a0696932024bef12ab5bdac0b.tar.bz2
(maint) Fix up pre-suite for beaker tests
Solaris packing was updated that requires a newer cert in the keychain of the VMs that we use. However for the older version of Solaris the cert is not on the keychain. This PR calls a beaker-puppet script that will add the required cert to the keychain of the VM. Also follow redirects when downloading agent.
-rw-r--r--.github/workflows/unit_tests_with_nightly_puppet_gem.yaml2
-rw-r--r--spec/spec_helper_acceptance.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
index 2ea5e91..85c367b 100644
--- a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
+++ b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
@@ -45,7 +45,7 @@ jobs:
- name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem
run: |
- curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
+ curl --location http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
gem install puppet.gem -N
- name: Prepare testing environment with bundler
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index a6836f2..6654675 100644
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -1,10 +1,16 @@
require 'beaker-rspec'
+require 'beaker-puppet'
require 'beaker/module_install_helper'
require 'beaker/puppet_install_helper'
RSpec.configure do |c|
c.before :suite do
unless ENV['BEAKER_provision'] == 'no'
+ # Until solaris gets new image we need to add to the cert chain on solaris, call a beaker-puppet setup script to handle this
+ bp_path, _status = Open3.capture2('bundler info beaker-puppet --path')
+ bp_path.strip!
+ solaris_patch_path = bp_path + '/setup/common/003_solaris_cert_fix.rb'
+ require solaris_patch_path
run_puppet_install_helper
install_module_on(hosts)
install_module_dependencies_on(hosts)