simp-beaker-helpers 3.1.0 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 249a3f841428c2b28cbe7961183d25344edc726652e3ae5bb66c084e9a30b2d9
4
- data.tar.gz: 29fb61f0eb9dd16251d1389dd5b68457b93e3bbd81946e52a153dc82ace40fbd
3
+ metadata.gz: 7487245f845a8b08a99fb9ff13bc22527ed5438c3ba59d9fcae3f98a7e48851c
4
+ data.tar.gz: 8870dc7e054399cb22974c5858791389d6a0678985e9a2d332be8ff8f73bb8ae
5
5
  SHA512:
6
- metadata.gz: d42a18f587b5c613a0ce1d4af8946be6f070e258e1012e8b1811dd63d93caa0fe967205b545ddc3462b87d37d3df58902bb5aca8705528750e08eb80166b80ab
7
- data.tar.gz: 5ddf2f564b29b9eb93e8d02c5bb5670d3019cf2ed2950c8083cbbc5d0a29ddca349b5009e1ec81242292af0d80b84149c0afcda54c97dc443cbe1b50584bbc9f
6
+ metadata.gz: 5254345501682c0657fe99d79616258ddd1126beb2b74cab969f31e4ce31b9f8f670c8981be75246492b60981304519ae8bd29480c7e939ed100f546f2b431f3
7
+ data.tar.gz: b2e96e3bdd29439ae26ce70916b4a2ddfc34840ff8d9a3ba163c26a33cc3a75a29d0480be786a6890f5c0de92f600c686130e11fb30f31a532bed7af0e0637b8
@@ -1,3 +1,37 @@
1
+ # Add newly opened issues and pull requests to the Org Triage board
2
+ # ------------------------------------------------------------------------------
3
+ # NOTICE: **This file is maintained with puppetsync**
4
+ #
5
+ # This file is updated automatically as part of a puppet module baseline.
6
+ #
7
+ # The next baseline sync will overwrite any local changes to this file!
8
+ #
9
+ # ==============================================================================
10
+ #
11
+ # Board: https://github.com/orgs/simp/projects/11
12
+ #
13
+ # Intake is filtered (simp/puppetsync#97): automated traffic never needs a
14
+ # human to triage it, and letting it in buried the items that do.
15
+ #
16
+ # * Renovate (and Dependabot, pre-emptively) are matched by actor.
17
+ # * puppetsync's own sync PRs are matched by the `[puppetsync]` title prefix.
18
+ # That prefix is a CONVENTION set by the `commit_message` in each sync
19
+ # config, not something enforced -- a config that drops it would silently
20
+ # start adding sync PRs to the board again.
21
+ #
22
+ # PRs in general are deliberately NOT filtered: drive-by PRs from outside
23
+ # contributors are exactly what the board must catch.
24
+ #
25
+ # This workflow does not check out any code, which is what makes its use of
26
+ # `pull_request_target` safe. Keep it that way.
27
+ #
28
+ # Labelling (`community` for outside contributions, `needs-attention` for
29
+ # stalled items) is NOT done here: the event payload's `author_association`
30
+ # reports private org members as CONTRIBUTOR, so a per-repo step would mislabel
31
+ # most of the team. It lives in the scheduled org job
32
+ # simp/gha-workflows/.github/workflows/org_reconcile_board_status.yml, which
33
+ # resolves membership from the org member list (simp/puppetsync#98, #99).
34
+ #
1
35
  ---
2
36
  name: Add new issues to triage project
3
37
 
@@ -14,6 +48,14 @@ jobs:
14
48
  add-to-project:
15
49
  name: Add issue to project
16
50
  runs-on: ubuntu-latest
51
+ # `github.event.pull_request` is null on `issues` events, so the title test
52
+ # is guarded by event_name rather than relying on startsWith(null, ...)
53
+ # evaluating false.
54
+ if: >-
55
+ github.actor != 'renovate[bot]' &&
56
+ github.actor != 'dependabot[bot]' &&
57
+ !(github.event_name == 'pull_request_target' &&
58
+ startsWith(github.event.pull_request.title, '[puppetsync]'))
17
59
  steps:
18
60
  - uses: actions/add-to-project@v2
19
61
  with:
@@ -36,7 +36,7 @@ jobs:
36
36
  - name: "Install Ruby 3.2"
37
37
  uses: ruby/setup-ruby@v1
38
38
  with:
39
- ruby-version: 4.0.5
39
+ ruby-version: 4.0.7
40
40
  bundler-cache: true
41
41
  - run: |
42
42
  bundle show
@@ -92,7 +92,7 @@ jobs:
92
92
  echo "release_command=$GEM_RELEASE_COMMAND" | tee -a "$GITHUB_OUTPUT"
93
93
  - uses: ruby/setup-ruby@v1
94
94
  with:
95
- ruby-version: 4.0.5
95
+ ruby-version: 4.0.7
96
96
  bundler-cache: true
97
97
  - name: Test build the package
98
98
  run: "${{ steps.commands.outputs.build_command }}"
@@ -184,7 +184,7 @@ jobs:
184
184
  clean: true
185
185
  - uses: ruby/setup-ruby@v1
186
186
  with:
187
- ruby-version: 4.0.5
187
+ ruby-version: 4.0.7
188
188
  bundler-cache: true
189
189
  - name: Build RubyGem
190
190
  run: |
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### 3.1.2 / 2026-09-29
2
+ * Fixed:
3
+ * Minor changes for rubocop 1.91
4
+
5
+ ### 3.1.1 / 2026-07-03
6
+ * Fixed:
7
+ * `run_fake_pki_ca_on` now runs `ensure_beaker_ip_on` before collecting
8
+ the IP addresses embedded in certificate subjectAltNames, so certs match
9
+ the corrected (Beaker-recorded) addresses on SUTs where the static
10
+ private-network IP was never applied (e.g. EL10 under Vagrant). Without
11
+ this, IKE peer IDs no longer match the cert SANs after remediation and
12
+ strict validators (libreswan 5) reject authentication.
13
+
1
14
  ### 3.1.0 / 2026-07-02
2
15
  * Added:
3
16
  * `ensure_beaker_ip_on`: detect SUTs whose recorded `host[:ip]` was never
data/Gemfile CHANGED
@@ -47,8 +47,8 @@ group :system_tests do
47
47
  end
48
48
 
49
49
  group :tests do
50
- gem 'rubocop', '~> 1.88.0'
51
- gem 'rubocop-performance', '~> 1.26.0'
50
+ gem 'rubocop', '~> 1.91.0'
51
+ gem 'rubocop-performance', '~> 1.27.0'
52
52
  gem 'rubocop-rake', '~> 0.7.0'
53
53
  gem 'rubocop-rspec', '~> 3.10.0'
54
54
  end
@@ -4,5 +4,5 @@
4
4
  module Simp; end
5
5
 
6
6
  module Simp::BeakerHelpers # rubocop:disable Style/OneClassPerFile
7
- VERSION = '3.1.0'
7
+ VERSION = '3.1.2'
8
8
  end
@@ -24,7 +24,7 @@ module Simp::BeakerHelpers # rubocop:disable Style/OneClassPerFile
24
24
 
25
25
  # Stealing this from the Ruby 2.5 Dir::Tmpname workaround from Rails
26
26
  def self.tmpname
27
- t = Time.new.strftime('%Y%m%d')
27
+ t = Time.now.strftime('%Y%m%d')
28
28
  "simp-beaker-helpers-#{t}-#{$PROCESS_ID}-#{rand(0x100000000).to_s(36)}.tmp"
29
29
  end
30
30
 
@@ -976,6 +976,13 @@ module Simp::BeakerHelpers # rubocop:disable Style/OneClassPerFile
976
976
  # Ensure that all interfaces are active prior to collecting data
977
977
  activate_interfaces(host)
978
978
 
979
+ # Ensure the Beaker-recorded IP is actually applied before it is
980
+ # embedded in certificate subjectAltNames (on EL10 under Vagrant the
981
+ # static private-network IP is silently never applied and the
982
+ # interface falls back to DHCP; certs cut from the DHCP address no
983
+ # longer match the peer IDs once the address is corrected)
984
+ ensure_beaker_ip_on(host)
985
+
979
986
  networking_fact = pfact_on(host, 'networking')
980
987
  if networking_fact && networking_fact['interfaces']
981
988
  networking_fact['interfaces'].each_value do |data|
@@ -24,11 +24,10 @@ describe 'Inspec STIG Profile' do
24
24
 
25
25
  let(:inspec_report_data) { inspec.process_inspec_results }
26
26
 
27
- # rubocop:disable RSpec/RepeatedDescription
27
+ # rubocop:disable-next RSpec/RepeatedDescription
28
28
  it 'runs inspec' do
29
29
  inspec.run
30
30
  end
31
- # rubocop:enable RSpec/RepeatedDescription
32
31
 
33
32
  it 'has an inspec report' do
34
33
  expect(inspec_report_data).not_to be_nil
@@ -41,11 +40,10 @@ describe 'Inspec STIG Profile' do
41
40
  puts inspec_report_data[:report] # rubocop:disable RSpec/Output
42
41
  end
43
42
  else
44
- # rubocop:disable RSpec/RepeatedDescription
43
+ # rubocop:disable-next RSpec/RepeatedDescription
45
44
  it 'runs inspec' do
46
45
  skip("No matching profile available at #{profile_path}")
47
46
  end
48
- # rubocop:enable RSpec/RepeatedDescription
49
47
  end
50
48
  end
51
49
  end
@@ -175,22 +175,20 @@ describe 'Offline mode' do
175
175
  on(host, %(#{build_user_cmd} "cd pupmod-simp-at; bundle update"))
176
176
  end
177
177
 
178
- # rubocop:disable RSpec/RepeatedExample
178
+ # rubocop:disable-next RSpec/RepeatedExample
179
179
  it 'runs a network-connected test' do
180
180
  on(host, %(#{build_user_cmd} "cd pupmod-simp-at; rake beaker:suites"))
181
181
  end
182
- # rubocop:enable RSpec/RepeatedExample
183
182
 
184
183
  it 'disables all internet network traffic via iptables' do
185
184
  on(host, %(iptables -I OUTPUT -d `ip route | awk '/default/ {print $3}'`/16 -j ACCEPT))
186
185
  on(host, 'iptables -A OUTPUT -j DROP')
187
186
  end
188
187
 
189
- # rubocop:disable RSpec/RepeatedExample
188
+ # rubocop:disable-next RSpec/RepeatedExample
190
189
  xit 'runs a network-disconnected test' do
191
190
  on(host, %(#{build_user_cmd} "cd pupmod-simp-at; rake beaker:suites"))
192
191
  end
193
- # rubocop:enable RSpec/RepeatedExample
194
192
  end
195
193
  end
196
194
  end
@@ -3,72 +3,63 @@ require 'spec_helper_acceptance'
3
3
  hosts.each do |host|
4
4
  describe 'take a snapshot' do
5
5
  context "on #{host}" do
6
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
6
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
7
7
  it 'creates a file that should be saved' do
8
8
  on(host, 'echo "keep" > /root/keep')
9
9
  end
10
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
11
10
 
12
- # rubocop:disable RSpec/RepeatedExample
11
+ # rubocop:disable-next RSpec/RepeatedExample
13
12
  it 'takes a snapshot' do
14
13
  Simp::BeakerHelpers::Snapshot.save(host, 'test')
15
14
  end
16
- # rubocop:enable RSpec/RepeatedExample
17
15
 
18
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
16
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
19
17
  it 'creates a file that should be removed' do
20
18
  on(host, 'echo "trash" > /root/trash')
21
19
  end
22
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
23
20
 
24
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
21
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
25
22
  it 'restores a snapshot' do
26
23
  Simp::BeakerHelpers::Snapshot.restore(host, 'test')
27
24
  end
28
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
29
25
 
30
26
  it 'has the keep file' do
31
27
  expect(host.file_exist?('/root/keep')).to be true
32
28
  end
33
29
 
34
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
30
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
35
31
  it 'does not have the trash file' do
36
32
  expect(host.file_exist?('/root/trash')).to be false
37
33
  end
38
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
39
34
 
40
35
  it 'creates a second file that should be saved' do
41
36
  on(host, 'echo "keep2" > /root/keep2')
42
37
  end
43
38
 
44
- # rubocop:disable RSpec/RepeatedExample
39
+ # rubocop:disable-next RSpec/RepeatedExample
45
40
  it 'takes a snapshot with the same name' do
46
41
  Simp::BeakerHelpers::Snapshot.save(host, 'test')
47
42
  end
48
- # rubocop:enable RSpec/RepeatedExample
49
43
 
50
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
44
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
51
45
  it 'creates a file that should be removed' do
52
46
  on(host, 'echo "trash" > /root/trash')
53
47
  end
54
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
55
48
 
56
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
49
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
57
50
  it 'restores a snapshot' do
58
51
  Simp::BeakerHelpers::Snapshot.restore(host, 'test')
59
52
  end
60
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
61
53
 
62
54
  it 'has all keep files' do
63
55
  expect(host.file_exist?('/root/keep')).to be true
64
56
  expect(host.file_exist?('/root/keep2')).to be true
65
57
  end
66
58
 
67
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
59
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
68
60
  it 'does not have the trash file' do
69
61
  expect(host.file_exist?('/root/trash')).to be false
70
62
  end
71
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
72
63
 
73
64
  it 'takes a snapshot with a different name' do
74
65
  Simp::BeakerHelpers::Snapshot.save(host, 'test2')
@@ -88,11 +79,10 @@ hosts.each do |host|
88
79
  Simp::BeakerHelpers::Snapshot.restore_to_base(host)
89
80
  end
90
81
 
91
- # rubocop:disable RSpec/RepeatedExample, RSpec/RepeatedDescription
82
+ # rubocop:disable-next RSpec/RepeatedExample, RSpec/RepeatedDescription
92
83
  it 'creates a file that should be saved' do
93
84
  on(host, 'echo "keep" > /root/keep')
94
85
  end
95
- # rubocop:enable RSpec/RepeatedExample, RSpec/RepeatedDescription
96
86
 
97
87
  it 'creates a handoff snapshot for further tests' do
98
88
  Simp::BeakerHelpers::Snapshot.save(host, 'handoff')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
8
8
  - Trevor Vaughan
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-03 00:00:00.000000000 Z
11
+ date: 2026-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beaker
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubygems_version: 4.0.10
282
+ rubygems_version: 4.0.20
283
283
  specification_version: 4
284
284
  summary: beaker helper methods for SIMP
285
285
  test_files: []