simp-beaker-helpers 1.36.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +0 -1
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +10 -18
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +1 -2
- data/spec/lib/simp/beaker_helpers_spec.rb +0 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13a6aa9c1e468fc6b3902a01b20775a6fa2e749bb1a5d5ba52cd161943cd3b80
|
4
|
+
data.tar.gz: bd67173fa6a6d65a88b631fcc7a8040de13f3d3ed763da44b605fbc7b350bc55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c88ef399a0c91f621fa1610abfa9ee8cbfad327a5e84b39b487fa1c3d838333732d3340cb8c4967a88d90ab6d0788d3c5104adfb8780d7a75316a5a863da131e
|
7
|
+
data.tar.gz: fc1831aa56ea337aceef83ba23b9f2fd938b32ec016e33f3ee5e5c526a932530cb30ab1b81c1531d1fba4fe394b32d23d924512f7865bc4586ffdeeb115c01a3
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -764,7 +764,7 @@ module Simp::BeakerHelpers
|
|
764
764
|
u.strip!
|
765
765
|
u = u.split(':')
|
766
766
|
%r{^(/|/dev/.*|/s?bin/?.*|/proc/?.*)$}.match?(u[5]) ? [nil] : [u[0], u[5]]
|
767
|
-
end
|
767
|
+
end
|
768
768
|
]
|
769
769
|
|
770
770
|
user_info.each_key do |user|
|
@@ -1393,7 +1393,7 @@ module Simp::BeakerHelpers
|
|
1393
1393
|
#
|
1394
1394
|
# @return [String,Nil] the `puppet-agent` version or nil
|
1395
1395
|
#
|
1396
|
-
def latest_puppet_agent_version_for(puppet_version
|
1396
|
+
def latest_puppet_agent_version_for(puppet_version)
|
1397
1397
|
return nil if puppet_version.nil?
|
1398
1398
|
|
1399
1399
|
require 'rubygems/requirement'
|
@@ -1418,7 +1418,7 @@ module Simp::BeakerHelpers
|
|
1418
1418
|
puppet_gems = nil
|
1419
1419
|
|
1420
1420
|
Bundler.with_unbundled_env do
|
1421
|
-
puppet_gems = `gem search -ra -e
|
1421
|
+
puppet_gems = `gem search -ra -e puppet`.match(%r{\((.+)\)})
|
1422
1422
|
end
|
1423
1423
|
|
1424
1424
|
if puppet_gems
|
@@ -1467,10 +1467,10 @@ module Simp::BeakerHelpers
|
|
1467
1467
|
|
1468
1468
|
if puppet_agent_version.nil?
|
1469
1469
|
if (puppet_collection = ENV['BEAKER_PUPPET_COLLECTION'] || host.options['puppet_collection'])
|
1470
|
-
raise("Error: Puppet Collection '#{puppet_collection}' must match /
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1470
|
+
raise("Error: Puppet Collection '#{puppet_collection}' must match /puppet(\\d+)/") unless puppet_collection =~ %r{puppet(\d+)}
|
1471
|
+
puppet_install_version = "~> #{::Regexp.last_match(1)}"
|
1472
|
+
puppet_agent_version = latest_puppet_agent_version_for(puppet_install_version)
|
1473
|
+
|
1474
1474
|
else
|
1475
1475
|
puppet_agent_version = latest_puppet_agent_version_for(DEFAULT_PUPPET_AGENT_VERSION)
|
1476
1476
|
end
|
@@ -1488,27 +1488,19 @@ module Simp::BeakerHelpers
|
|
1488
1488
|
}
|
1489
1489
|
end
|
1490
1490
|
|
1491
|
-
def run_puppet_install_helper_on(hosts)
|
1492
|
-
block_on hosts, run_in_parallel: true do |host|
|
1493
|
-
BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, ENV['BEAKER_PUPPET_COLLECTION'])
|
1494
|
-
package_name = ENV.fetch('BEAKER_PUPPET_PACKAGE_NAME', BeakerPuppetHelpers::InstallUtils.collection2packagename(host, ENV['BEAKER_PUPPET_COLLECTION']))
|
1495
|
-
host.install_package(package_name)
|
1496
|
-
end
|
1497
|
-
end
|
1498
|
-
|
1499
1491
|
# Replacement for `install_puppet` in spec_helper_acceptance.rb
|
1500
1492
|
def install_puppet
|
1501
1493
|
install_info = get_puppet_install_info
|
1502
1494
|
|
1503
1495
|
# In case Beaker needs this info internally
|
1496
|
+
ENV['PUPPET_INSTALL_VERSION'] = install_info[:puppet_install_version]
|
1504
1497
|
if install_info[:puppet_collection]
|
1505
1498
|
ENV['BEAKER_PUPPET_COLLECTION'] = install_info[:puppet_collection]
|
1506
1499
|
end
|
1507
1500
|
|
1508
|
-
require '
|
1509
|
-
|
1501
|
+
require 'beaker-puppet'
|
1502
|
+
install_puppet_on(hosts, version: install_info[:puppet_install_version])
|
1510
1503
|
end
|
1511
|
-
alias install_openvox install_puppet
|
1512
1504
|
|
1513
1505
|
# Configure all SIMP repos on a host and disable all repos in the disable Array
|
1514
1506
|
#
|
@@ -8,8 +8,7 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
8
8
|
|
9
9
|
describe "fact_on(default,'root_home')" do
|
10
10
|
it 'does not return value of `root_home`' do
|
11
|
-
|
12
|
-
expect(Beaker::DSL::Helpers::FacterHelpers.fact_on(default, 'root_home').to_s).to eq ''
|
11
|
+
expect(fact_on(default, 'root_home').to_s).to eq ''
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
@@ -64,11 +64,6 @@ describe 'Simp::BeakerHelpers' do
|
|
64
64
|
].join(', ')})\n"
|
65
65
|
end
|
66
66
|
|
67
|
-
let(:openvox_gem_search_results) do
|
68
|
-
# subset of results, but still exercises code
|
69
|
-
"openvox (8.19.2, 8.19.1, 8.19.0, 7.37.2, 7.37.1)\n"
|
70
|
-
end
|
71
|
-
|
72
67
|
context '#latest_puppet_agent_version_for' do
|
73
68
|
context 'using table' do
|
74
69
|
it 'maps exact Puppet version' do
|
@@ -211,17 +206,6 @@ describe 'Simp::BeakerHelpers' do
|
|
211
206
|
expect(helper.get_puppet_install_info).to eq expected
|
212
207
|
end
|
213
208
|
|
214
|
-
it 'extracts openvox info from BEAKER_PUPPET_COLLECTION' do
|
215
|
-
allow(helper).to receive(:`).with('gem search -ra -e openvox').and_return(openvox_gem_search_results)
|
216
|
-
helper.host.options = { 'puppet_collection' => 'openvox8' }
|
217
|
-
expected = {
|
218
|
-
puppet_install_version: '8.19.2',
|
219
|
-
puppet_collection: 'openvox8',
|
220
|
-
puppet_install_type: 'agent'
|
221
|
-
}
|
222
|
-
expect(helper.get_puppet_install_info).to eq expected
|
223
|
-
end
|
224
|
-
|
225
209
|
it 'extracts info from PUPPET_INSTALL_TYPE' do
|
226
210
|
ENV['PUPPET_INSTALL_TYPE'] = 'pe'
|
227
211
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.36.
|
4
|
+
version: 1.36.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|