simp-beaker-helpers 2.0.1 → 2.0.2
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/.github/workflows/pr_acceptance.yml +11 -2
- data/.github/workflows/pr_tests.yml +5 -5
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +13 -10
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +9 -14
- data/simp-beaker-helpers.gemspec +8 -8
- data/spec/acceptance/nodesets/amzn2.yml +1 -1
- data/spec/acceptance/nodesets/default.yml +1 -1
- data/spec/acceptance/nodesets/docker.yml +1 -1
- data/spec/acceptance/nodesets/oel.yml +1 -1
- data/spec/acceptance/nodesets/ubuntu.yml +1 -1
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +3 -3
- data/spec/acceptance/suites/offline/nodesets/default.yml +1 -1
- data/spec/acceptance/suites/snapshot/10_general_usage_spec.rb +2 -2
- data/spec/acceptance/suites/windows/nodesets/default.yml +1 -1
- data/spec/acceptance/suites/windows/nodesets/win2012.yml +1 -1
- data/spec/acceptance/suites/windows/nodesets/win2016.yml +1 -1
- data/spec/acceptance/suites/windows/nodesets/win2019.yml +1 -1
- metadata +29 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20611993c0b38c821da287d01266302a5de462fce9dc91005f249675da5e0454
|
4
|
+
data.tar.gz: c069784a8d04644b1bf52c476b57cbb4d0432774ae87dabef8167387fd51bc08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce1b8cdd761a7893576d97403e0b6860fb626528f0fc6c64aad17c06029225f764b31f9648f4c60d7b0de96fde63e16cf8f2b5261e9ac2c9d05801919f13609
|
7
|
+
data.tar.gz: 99d9c3085ee58c56f8650bdd0708d81fdb2fc128f3d114afd31883533b058345edeadb46307b537341b294cf7a317d5ef3484d7b073f95726b918b850ae1a6cc
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Run all tests as GitHub Actions
|
2
|
+
---
|
2
3
|
name: Acceptance Tests
|
3
|
-
on:
|
4
|
+
'on':
|
4
5
|
push:
|
5
6
|
branches:
|
6
7
|
# A test branch for seeing if your tests will pass in your personal fork
|
@@ -10,7 +11,7 @@ on:
|
|
10
11
|
|
11
12
|
jobs:
|
12
13
|
acceptance:
|
13
|
-
name: '${{matrix.beaker.suite}},
|
14
|
+
name: '${{matrix.beaker.suite}}, ${{matrix.puppet.label}}'
|
14
15
|
runs-on:
|
15
16
|
- ubuntu-latest
|
16
17
|
strategy:
|
@@ -24,6 +25,11 @@ jobs:
|
|
24
25
|
puppet_version: '~> 8.0'
|
25
26
|
ruby_version: '3.2'
|
26
27
|
experimental: false
|
28
|
+
- label: 'OpenVox 8.x'
|
29
|
+
puppet_version: '~> 8.0'
|
30
|
+
ruby_version: '3.2'
|
31
|
+
collection: 'openvox8'
|
32
|
+
experimental: false
|
27
33
|
beaker:
|
28
34
|
- label: beaker
|
29
35
|
suite: default
|
@@ -67,6 +73,9 @@ jobs:
|
|
67
73
|
run: |
|
68
74
|
bundle config path vendor
|
69
75
|
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
|
70
79
|
- name: 'run beaker:suite "${{matrix.beaker.label}}"'
|
71
80
|
continue-on-error: ${{matrix.puppet.experimental || matrix.beaker.allowed_to_fail}}
|
72
81
|
env:
|
@@ -13,9 +13,9 @@
|
|
13
13
|
#
|
14
14
|
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
|
15
15
|
#
|
16
|
-
|
16
|
+
---
|
17
17
|
name: PR Tests
|
18
|
-
on:
|
18
|
+
'on':
|
19
19
|
push:
|
20
20
|
branches:
|
21
21
|
# A test branch for seeing if your tests will pass in your personal fork
|
@@ -24,7 +24,7 @@ on:
|
|
24
24
|
types: [opened, reopened, synchronize]
|
25
25
|
|
26
26
|
env:
|
27
|
-
PUPPET_VERSION: '~>
|
27
|
+
PUPPET_VERSION: '~> 8'
|
28
28
|
|
29
29
|
jobs:
|
30
30
|
ruby-style:
|
@@ -33,10 +33,10 @@ jobs:
|
|
33
33
|
continue-on-error: true
|
34
34
|
steps:
|
35
35
|
- uses: actions/checkout@v5
|
36
|
-
- name: "Install Ruby 2
|
36
|
+
- name: "Install Ruby 3.2"
|
37
37
|
uses: ruby/setup-ruby@v1
|
38
38
|
with:
|
39
|
-
ruby-version: 2
|
39
|
+
ruby-version: 3.2
|
40
40
|
bundler-cache: true
|
41
41
|
- run: |
|
42
42
|
bundle show
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ gemspec
|
|
11
11
|
gem 'rake'
|
12
12
|
|
13
13
|
group :system_tests do
|
14
|
-
beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '<
|
14
|
+
beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '< 8.0.0'])
|
15
15
|
|
16
16
|
if beaker_gem_options.to_s.include?(':')
|
17
17
|
# Just pass in BEAKER_GEM_OPTIONS as a string that would represent the usual
|
@@ -25,8 +25,8 @@ group :system_tests do
|
|
25
25
|
beaker_gem_options = Hash[
|
26
26
|
beaker_gem_options.split(',').
|
27
27
|
# Split passed options on k/v pairs
|
28
|
-
map { |x| x.
|
29
|
-
|
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
|
30
30
|
] # Convert the whole thing to a valid Hash
|
31
31
|
rescue StandardError => e
|
32
32
|
raise "Invalid BEAKER_GEM_OPTIONS: '#{beaker_gem_options}' => '#{e}'"
|
@@ -37,15 +37,18 @@ group :system_tests do
|
|
37
37
|
|
38
38
|
gem 'bcrypt_pbkdf'
|
39
39
|
gem 'beaker-rspec'
|
40
|
-
gem 'beaker_puppet_helpers'
|
41
40
|
gem 'beaker-windows'
|
42
41
|
gem 'ed25519'
|
43
42
|
gem 'net-ssh'
|
43
|
+
gem 'openvox', ENV.fetch('OPENVOX_VERSION', ENV.fetch('PUPPET_VERSION', ['>= 7.0.0', '< 9.0.0']))
|
44
44
|
gem 'pry-byebug', '~> 3.10.0'
|
45
|
-
gem '
|
46
|
-
gem '
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
gem 'rubocop
|
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
|
50
|
+
gem 'rubocop', '~> 1.81.0'
|
51
|
+
gem 'rubocop-performance', '~> 1.26.0'
|
52
|
+
gem 'rubocop-rake', '~> 0.7.0'
|
53
|
+
gem 'rubocop-rspec', '~> 3.7.0'
|
51
54
|
end
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'English'
|
2
|
-
require '
|
2
|
+
require 'beaker_puppet_helpers'
|
3
|
+
require 'beaker_puppet_helpers/dsl'
|
3
4
|
require 'bundler'
|
4
5
|
|
5
6
|
# SIMP namespace
|
@@ -7,7 +8,8 @@ module Simp; end
|
|
7
8
|
|
8
9
|
# SIMP Beaker helper methods for testing
|
9
10
|
module Simp::BeakerHelpers
|
10
|
-
include
|
11
|
+
include BeakerPuppetHelpers
|
12
|
+
include BeakerPuppetHelpers::DSL
|
11
13
|
|
12
14
|
require 'simp/beaker_helpers/constants'
|
13
15
|
require 'simp/beaker_helpers/inspec'
|
@@ -16,6 +18,9 @@ module Simp::BeakerHelpers
|
|
16
18
|
require 'simp/beaker_helpers/version'
|
17
19
|
require 'find'
|
18
20
|
|
21
|
+
PUPPET_MODULE_INSTALL_IGNORE = ['/.bundle', '/.git', '/.idea', '/.vagrant', '/.vendor', '/vendor', '/acceptance',
|
22
|
+
'/bundle', '/spec', '/tests', '/log', '/.svn', '/junit', '/pkg', '/example', '/tmp'].freeze
|
23
|
+
|
19
24
|
@run_in_parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
|
20
25
|
|
21
26
|
# Stealing this from the Ruby 2.5 Dir::Tmpname workaround from Rails
|
@@ -782,14 +787,6 @@ module Simp::BeakerHelpers
|
|
782
787
|
on sut, 'puppet config set stringify_facts false'
|
783
788
|
end
|
784
789
|
|
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
|
-
|
793
790
|
if os_info['family'] == 'RedHat'
|
794
791
|
# OS-specific items
|
795
792
|
if os_info['name'] == 'RedHat'
|
@@ -1502,10 +1499,8 @@ module Simp::BeakerHelpers
|
|
1502
1499
|
def install_puppet
|
1503
1500
|
install_info = get_puppet_install_info
|
1504
1501
|
|
1505
|
-
# In case
|
1506
|
-
|
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)
|
1509
1504
|
|
1510
1505
|
require 'beaker_puppet_helpers'
|
1511
1506
|
run_puppet_install_helper_on(hosts)
|
data/simp-beaker-helpers.gemspec
CHANGED
@@ -22,14 +22,14 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 2.7.0'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'beaker',
|
26
|
-
s.add_runtime_dependency 'beaker-docker',
|
27
|
-
s.add_runtime_dependency 'beaker-
|
28
|
-
s.add_runtime_dependency 'beaker-
|
29
|
-
s.add_runtime_dependency '
|
30
|
-
s.add_runtime_dependency 'docker-api',
|
31
|
-
s.add_runtime_dependency 'highline',
|
32
|
-
s.add_runtime_dependency 'nokogiri',
|
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'
|
33
33
|
|
34
34
|
### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0")
|
35
35
|
s.files = %x(git ls-files).split("\n")
|
@@ -24,4 +24,4 @@ CONFIG:
|
|
24
24
|
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
|
25
25
|
hmac:
|
26
26
|
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>
|
27
|
-
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', '
|
27
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"
|
@@ -19,7 +19,7 @@ CONFIG:
|
|
19
19
|
log_level: verbose
|
20
20
|
type: aio
|
21
21
|
vagrant_cpus: 2
|
22
|
-
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', '
|
22
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"
|
23
23
|
ssh:
|
24
24
|
keepalive: true
|
25
25
|
keepalive_interval: 10
|
@@ -7,9 +7,9 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe "fact_on(default,'root_home')" do
|
10
|
-
|
11
|
-
|
12
|
-
expect(
|
10
|
+
# fact_on in beaker_puppet_helpers is equivalent to pfact_on
|
11
|
+
xit 'does not return value of `root_home`' do
|
12
|
+
expect(fact_on(default, 'root_home').to_s).to eq ''
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -13,7 +13,7 @@ HOSTS:
|
|
13
13
|
CONFIG:
|
14
14
|
log_level: verbose
|
15
15
|
type: aio
|
16
|
-
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', '
|
16
|
+
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"
|
17
17
|
libvirt:
|
18
18
|
# Ensure that we use the best option available
|
19
19
|
'cpu_mode': 'host-passthrough'
|
@@ -43,13 +43,13 @@ hosts.each do |host|
|
|
43
43
|
context 'existing snapshot' do
|
44
44
|
let(:init_snapshot) { 'handoff' }
|
45
45
|
|
46
|
-
|
46
|
+
it_behaves_like 'a snapshot test'
|
47
47
|
end
|
48
48
|
|
49
49
|
context 'missing snapshot' do
|
50
50
|
let(:init_snapshot) { 'missing' }
|
51
51
|
|
52
|
-
|
52
|
+
it_behaves_like 'a snapshot test'
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
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: 2.0.
|
4
|
+
version: 2.0.2
|
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-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -17,20 +17,20 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.
|
20
|
+
version: 4.28.1
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 8.0.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 4.
|
30
|
+
version: 4.28.1
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 8.0.0
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: beaker-docker
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: 0.8.3
|
41
41
|
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 4.0.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -50,61 +50,67 @@ dependencies:
|
|
50
50
|
version: 0.8.3
|
51
51
|
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 4.0.0
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
|
-
name: beaker-
|
55
|
+
name: beaker-rspec
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: '8.0'
|
61
61
|
- - "<"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
63
|
+
version: 10.0.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
70
|
+
version: '8.0'
|
71
71
|
- - "<"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: 10.0.0
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
|
-
name: beaker-
|
75
|
+
name: beaker-vagrant
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - "
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 0.6.4
|
81
|
+
- - "<"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 3.0.0
|
81
84
|
type: :runtime
|
82
85
|
prerelease: false
|
83
86
|
version_requirements: !ruby/object:Gem::Requirement
|
84
87
|
requirements:
|
85
|
-
- - "
|
88
|
+
- - ">="
|
86
89
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
90
|
+
version: 0.6.4
|
91
|
+
- - "<"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 3.0.0
|
88
94
|
- !ruby/object:Gem::Dependency
|
89
|
-
name:
|
95
|
+
name: beaker_puppet_helpers
|
90
96
|
requirement: !ruby/object:Gem::Requirement
|
91
97
|
requirements:
|
92
98
|
- - ">="
|
93
99
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.
|
100
|
+
version: 2.0.0
|
95
101
|
- - "<"
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
103
|
+
version: 4.0.0
|
98
104
|
type: :runtime
|
99
105
|
prerelease: false
|
100
106
|
version_requirements: !ruby/object:Gem::Requirement
|
101
107
|
requirements:
|
102
108
|
- - ">="
|
103
109
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.
|
110
|
+
version: 2.0.0
|
105
111
|
- - "<"
|
106
112
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
113
|
+
version: 4.0.0
|
108
114
|
- !ruby/object:Gem::Dependency
|
109
115
|
name: docker-api
|
110
116
|
requirement: !ruby/object:Gem::Requirement
|