Skip to content

Commit 12f242c

Browse files
authored
Update dependencies (#240)
* Update dependencies * Drop beaker-puppet dependency * Don't override BEAKER_PUPPET_COLLECTION * Use openvox for testing * Clean up for rubocop Fixes #239
1 parent 5506e75 commit 12f242c

File tree

19 files changed

+62
-51
lines changed

19 files changed

+62
-51
lines changed

.github/workflows/pr_acceptance.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Run all tests as GitHub Actions
2+
---
23
name: Acceptance Tests
3-
on:
4+
'on':
45
push:
56
branches:
67
# A test branch for seeing if your tests will pass in your personal fork
@@ -10,7 +11,7 @@ on:
1011

1112
jobs:
1213
acceptance:
13-
name: '${{matrix.beaker.suite}}, Puppet ${{matrix.puppet.puppet_version}}'
14+
name: '${{matrix.beaker.suite}}, ${{matrix.puppet.label}}'
1415
runs-on:
1516
- ubuntu-latest
1617
strategy:
@@ -24,6 +25,11 @@ jobs:
2425
puppet_version: '~> 8.0'
2526
ruby_version: '3.2'
2627
experimental: false
28+
- label: 'OpenVox 8.x'
29+
puppet_version: '~> 8.0'
30+
ruby_version: '3.2'
31+
collection: 'openvox8'
32+
experimental: false
2733
beaker:
2834
- label: beaker
2935
suite: default
@@ -67,6 +73,9 @@ jobs:
6773
run: |
6874
bundle config path vendor
6975
bundle install -j $(nproc)
76+
- name: set BEAKER_PUPPET_COLLECTION
77+
if: ${{matrix.puppet.collection}}
78+
run: echo "BEAKER_PUPPET_COLLECTION=${{matrix.puppet.collection}}" >> $GITHUB_ENV
7079
- name: 'run beaker:suite "${{matrix.beaker.label}}"'
7180
continue-on-error: ${{matrix.puppet.experimental || matrix.beaker.allowed_to_fail}}
7281
env:

.github/workflows/pr_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#
1414
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
1515
#
16-
16+
---
1717
name: PR Tests
18-
on:
18+
'on':
1919
push:
2020
branches:
2121
# A test branch for seeing if your tests will pass in your personal fork
@@ -24,7 +24,7 @@ on:
2424
types: [opened, reopened, synchronize]
2525

2626
env:
27-
PUPPET_VERSION: '~> 7'
27+
PUPPET_VERSION: '~> 8'
2828

2929
jobs:
3030
ruby-style:
@@ -33,10 +33,10 @@ jobs:
3333
continue-on-error: true
3434
steps:
3535
- uses: actions/checkout@v5
36-
- name: "Install Ruby 2.7"
36+
- name: "Install Ruby 3.2"
3737
uses: ruby/setup-ruby@v1
3838
with:
39-
ruby-version: 2.7
39+
ruby-version: 3.2
4040
bundler-cache: true
4141
- run: |
4242
bundle show

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
require:
2+
plugins:
33
- rubocop-performance
44
- rubocop-rake
55
- rubocop-rspec
66
AllCops:
77
NewCops: enable
88
DisplayCopNames: true
9-
TargetRubyVersion: "2.7"
9+
TargetRubyVersion: 2.7
1010
Include:
1111
- "**/*.rb"
1212
Exclude:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 2.0.2 / 2025-08-12
2+
* Fixed:
3+
* Updated dependencies to allow beaker >= 7.0.0 (#239)
4+
15
### 2.0.1 / 2025-08-28
26
* Fixed:
37
* Rename `fips_enabled` method to `fips_enabled?`

Gemfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gemspec
1111
gem 'rake'
1212

1313
group :system_tests do
14-
beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '< 7.0.0'])
14+
beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '< 8.0.0'])
1515

1616
if beaker_gem_options.to_s.include?(':')
1717
# Just pass in BEAKER_GEM_OPTIONS as a string that would represent the usual
@@ -25,8 +25,8 @@ group :system_tests do
2525
beaker_gem_options = Hash[
2626
beaker_gem_options.split(',').
2727
# Split passed options on k/v pairs
28-
map { |x| x.gsub('"', '').strip.split(%r{:\s|\s+=>\s+}) }. # Allow for either format hash keys
29-
map { |k, v| [k.delete(':').to_sym, v.strip] } # Convert all keys to symbols
28+
map { |x| x.delete('"').strip.split(%r{:\s|\s+=>\s+}) } # Allow for either format hash keys
29+
.map { |k, v| [k.delete(':').to_sym, v.strip] } # Convert all keys to symbols
3030
] # Convert the whole thing to a valid Hash
3131
rescue StandardError => e
3232
raise "Invalid BEAKER_GEM_OPTIONS: '#{beaker_gem_options}' => '#{e}'"
@@ -37,13 +37,16 @@ group :system_tests do
3737

3838
gem 'bcrypt_pbkdf'
3939
gem 'beaker-rspec'
40-
gem 'beaker_puppet_helpers'
4140
gem 'beaker-windows'
4241
gem 'ed25519'
4342
gem 'net-ssh'
43+
gem 'openvox', ENV.fetch('OPENVOX_VERSION', ENV.fetch('PUPPET_VERSION', ['>= 7.0.0', '< 9.0.0']))
4444
gem 'pry-byebug', '~> 3.10.0'
45-
gem 'puppet', ENV.fetch('PUPPET_VERSION', ['>= 7.0.0', '< 9.0.0'])
46-
gem 'puppetlabs_spec_helper', '>= 4.0.0', '< 8.0.1'
45+
gem 'puppetlabs_spec_helper', '>= 4.0.0', '< 9.0.0'
46+
gem 'syslog' # Required for Ruby >= 3.4
47+
end
48+
49+
group :tests do
4750
gem 'rubocop', '~> 1.81.0'
4851
gem 'rubocop-performance', '~> 1.26.0'
4952
gem 'rubocop-rake', '~> 0.7.0'

lib/simp/beaker_helpers.rb

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
require 'English'
2-
require 'beaker-puppet'
2+
require 'beaker_puppet_helpers'
3+
require 'beaker_puppet_helpers/dsl'
34
require 'bundler'
45

56
# SIMP namespace
67
module Simp; end
78

89
# SIMP Beaker helper methods for testing
910
module Simp::BeakerHelpers
10-
include BeakerPuppet
11+
include BeakerPuppetHelpers
12+
include BeakerPuppetHelpers::DSL
1113

1214
require 'simp/beaker_helpers/constants'
1315
require 'simp/beaker_helpers/inspec'
@@ -16,6 +18,9 @@ module Simp::BeakerHelpers
1618
require 'simp/beaker_helpers/version'
1719
require 'find'
1820

21+
PUPPET_MODULE_INSTALL_IGNORE = ['/.bundle', '/.git', '/.idea', '/.vagrant', '/.vendor', '/vendor', '/acceptance',
22+
'/bundle', '/spec', '/tests', '/log', '/.svn', '/junit', '/pkg', '/example', '/tmp'].freeze
23+
1924
@run_in_parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
2025

2126
# Stealing this from the Ruby 2.5 Dir::Tmpname workaround from Rails
@@ -782,14 +787,6 @@ def linux_errata(suts)
782787
on sut, 'puppet config set stringify_facts false'
783788
end
784789

785-
# Occasionally we run across something similar to BKR-561, so to ensure we
786-
# at least have the host defaults:
787-
#
788-
# :hieradatadir is used as a canary here; it isn't the only missing key
789-
unless sut.host_hash.key? :hieradatadir
790-
configure_type_defaults_on(sut)
791-
end
792-
793790
if os_info['family'] == 'RedHat'
794791
# OS-specific items
795792
if os_info['name'] == 'RedHat'
@@ -1502,10 +1499,8 @@ def run_puppet_install_helper_on(hosts)
15021499
def install_puppet
15031500
install_info = get_puppet_install_info
15041501

1505-
# In case Beaker needs this info internally
1506-
if install_info[:puppet_collection]
1507-
ENV['BEAKER_PUPPET_COLLECTION'] = install_info[:puppet_collection]
1508-
end
1502+
# In case Beaker needs this info internally
1503+
ENV['BEAKER_PUPPET_COLLECTION'] ||= install_info[:puppet_collection] if install_info.is_a?(Hash) && install_info.key?(:puppet_collection)
15091504

15101505
require 'beaker_puppet_helpers'
15111506
run_puppet_install_helper_on(hosts)

lib/simp/beaker_helpers/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
module Simp; end
55

66
module Simp::BeakerHelpers
7-
VERSION = '2.0.1'
7+
VERSION = '2.0.2'
88
end

simp-beaker-helpers.gemspec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Gem::Specification.new do |s|
2222

2323
s.required_ruby_version = '>= 2.7.0'
2424

25-
s.add_runtime_dependency 'beaker', ['>= 4.17.0', '< 7.0.0']
26-
s.add_runtime_dependency 'beaker-docker', ['>= 0.8.3', '< 3.0.0']
27-
s.add_runtime_dependency 'beaker-puppet', ['>= 1.18.14', '< 5.0.0']
28-
s.add_runtime_dependency 'beaker-rspec', '~> 8.0'
29-
s.add_runtime_dependency 'beaker-vagrant', ['>= 0.6.4', '< 2.0.0']
30-
s.add_runtime_dependency 'docker-api', ['>= 2.1.0', '< 3.0.0']
31-
s.add_runtime_dependency 'highline', ['>= 2.0', '< 4.0.0']
32-
s.add_runtime_dependency 'nokogiri', '~> 1.8'
25+
s.add_runtime_dependency 'beaker', ['>= 4.28.1', '< 8.0.0']
26+
s.add_runtime_dependency 'beaker-docker', ['>= 0.8.3', '< 4.0.0']
27+
s.add_runtime_dependency 'beaker-rspec', ['>= 8.0', '< 10.0.0']
28+
s.add_runtime_dependency 'beaker-vagrant', ['>= 0.6.4', '< 3.0.0']
29+
s.add_runtime_dependency 'beaker_puppet_helpers', ['>= 2.0.0', '< 4.0.0']
30+
s.add_runtime_dependency 'docker-api', ['>= 2.1.0', '< 3.0.0']
31+
s.add_runtime_dependency 'highline', ['>= 2.0', '< 4.0.0']
32+
s.add_runtime_dependency 'nokogiri', '~> 1.8'
3333

3434
### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0")
3535
s.files = %x(git ls-files).split("\n")

spec/acceptance/nodesets/amzn2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ CONFIG:
1111
log_level: verbose
1212
synced_folder: disabled
1313
type: aio
14-
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>"
14+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"

spec/acceptance/nodesets/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ CONFIG:
2424
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
2525
hmac:
2626
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>
27-
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>"
27+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"

0 commit comments

Comments
 (0)