beaker-puppet 4.4.1 → 4.4.3

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: 6f0348cca254c27334c26c725d3f4a85f8e1478ee9cc0f2225e5926191dbf2ad
4
- data.tar.gz: 80b547283b224d79124c4da2d64ac80d2e7f7e1f5771bb3b894b60dfac6e807b
3
+ metadata.gz: e9d1aa526da4c8769497a59aabdbbe0ac613257a1821007382990de7c33c3894
4
+ data.tar.gz: 8a39103726db46e5321e805fda7925197a2011c96f027dbd4cc9b936abcafc40
5
5
  SHA512:
6
- metadata.gz: f46087026e865f7e5cb5b92c10fc9f2d63622461506912d3d4d871cc4e1753a5ee259335e1f34eb2ee8ab2e855c7c9a3bb6a17d00db617bdff3d0eb5bb88d44f
7
- data.tar.gz: 1eb888543c65046ad3e562eb765099c087433309b14df31ba45b53d544f3776a32daf92e237d89d9352a5289ddc74e6b738d20c295bb371601214c54864794c7
6
+ metadata.gz: d71514b42d3f9aca125c68a7458a36c047a5a2a1214b5645acd0faba6274b3f30cc4e98de95526ce291318680a498491d977f8f150812a19a9f5f1c875b9d2db
7
+ data.tar.gz: 61fd33d1feff22ddbce4580e3865dc187d381eb125c8698e6b455f5abbc3ab46fe785152a94c49f2d71a5e7ca822fa6874290f3b31138e87fdbabd708be39093
data/CHANGELOG.md CHANGED
@@ -1,12 +1,27 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [4.4.3](https://github.com/puppetlabs/beaker-puppet/tree/4.4.3) (2026-08-17)
4
4
 
5
- ## [4.4.1](https://github.com/puppetlabs/beaker-puppet/tree/4.4.1) (2026-03-19)
5
+ [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.4.2...4.4.3)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - \(PE-45697\) Content-validate PuppetDB readiness over the ssl status port [\#280](https://github.com/puppetlabs/beaker-puppet/pull/280) ([steveax](https://github.com/steveax))
10
+
11
+ ## [4.4.2](https://github.com/puppetlabs/beaker-puppet/tree/4.4.2) (2026-08-12)
12
+
13
+ [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.4.1...4.4.2)
14
+
15
+ **Fixed bugs:**
16
+
17
+ - \(PE-45697\) Fall back to the ssl check when PuppetDB's cleartext status port is unavailable [\#278](https://github.com/puppetlabs/beaker-puppet/pull/278) ([jonathannewman](https://github.com/jonathannewman))
18
+ - \(maint\) Update GitHubSig to current GitHub RSA host key [\#277](https://github.com/puppetlabs/beaker-puppet/pull/277) ([Magisus](https://github.com/Magisus))
19
+
20
+ ## [4.4.1](https://github.com/puppetlabs/beaker-puppet/tree/4.4.1) (2026-03-20)
6
21
 
7
22
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.4.0...4.4.1)
8
23
 
9
- **Merged pull requests:**
24
+ **Fixed bugs:**
10
25
 
11
26
  - \(PA-8312\) Skip gem source add for Solaris & AIX [\#274](https://github.com/puppetlabs/beaker-puppet/pull/274) ([cthorn42](https://github.com/cthorn42))
12
27
 
@@ -14,10 +29,6 @@ All notable changes to this project will be documented in this file.
14
29
 
15
30
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.3.0...4.4.0)
16
31
 
17
- **Merged pull requests:**
18
-
19
- - beaker: Allow 7.x [\#272](https://github.com/puppetlabs/beaker-puppet/pull/272) ([bastelfreak](https://github.com/bastelfreak))
20
-
21
32
  ## [4.3.0](https://github.com/puppetlabs/beaker-puppet/tree/4.3.0) (2026-01-06)
22
33
 
23
34
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.2.0...4.3.0)
@@ -31,10 +42,6 @@ All notable changes to this project will be documented in this file.
31
42
 
32
43
  - Drop inifile dependency [\#206](https://github.com/puppetlabs/beaker-puppet/issues/206)
33
44
 
34
- **Merged pull requests:**
35
-
36
- - \(maint\) Update tests [\#268](https://github.com/puppetlabs/beaker-puppet/pull/268) ([mhashizume](https://github.com/mhashizume))
37
-
38
45
  ## [4.2.0](https://github.com/puppetlabs/beaker-puppet/tree/4.2.0) (2025-01-17)
39
46
 
40
47
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.1.1...4.2.0)
@@ -63,8 +70,6 @@ All notable changes to this project will be documented in this file.
63
70
 
64
71
  - Add support for Ubuntu 24.04 [\#257](https://github.com/puppetlabs/beaker-puppet/pull/257) ([joshcooper](https://github.com/joshcooper))
65
72
 
66
- **Merged pull requests:**
67
-
68
73
  ## [4.0.0](https://github.com/puppetlabs/beaker-puppet/tree/4.0.0) (2024-05-29)
69
74
 
70
75
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/2.1.0...4.0.0)
@@ -74,6 +79,7 @@ All notable changes to this project will be documented in this file.
74
79
  - Add support for Beaker 6 [\#255](https://github.com/puppetlabs/beaker-puppet/pull/255) ([mhashizume](https://github.com/mhashizume))
75
80
  - Remove unsupported network platforms [\#254](https://github.com/puppetlabs/beaker-puppet/pull/254) ([mhashizume](https://github.com/mhashizume))
76
81
 
82
+ ## [2.1.0](https://github.com/puppetlabs/beaker-puppet/tree/2.1.0) (2024-03-19)
77
83
 
78
84
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/3.0.1...2.1.0)
79
85
 
@@ -111,17 +117,6 @@ All notable changes to this project will be documented in this file.
111
117
 
112
118
  **Merged pull requests:**
113
119
 
114
- - Release prep [\#248](https://github.com/puppetlabs/beaker-puppet/pull/248) ([mhashizume](https://github.com/mhashizume))
115
- - Update excluded label to "maintenance" [\#247](https://github.com/puppetlabs/beaker-puppet/pull/247) ([mhashizume](https://github.com/mhashizume))
116
- - Add changelog generator configuration file [\#246](https://github.com/puppetlabs/beaker-puppet/pull/246) ([mhashizume](https://github.com/mhashizume))
117
- - Update release-prep script [\#245](https://github.com/puppetlabs/beaker-puppet/pull/245) ([mhashizume](https://github.com/mhashizume))
118
- - Update branch for github workflow testing [\#244](https://github.com/puppetlabs/beaker-puppet/pull/244) ([tvpartytonight](https://github.com/tvpartytonight))
119
- - Add release prep script [\#243](https://github.com/puppetlabs/beaker-puppet/pull/243) ([mhashizume](https://github.com/mhashizume))
120
- - Move to Puppet release GitHub Actions [\#242](https://github.com/puppetlabs/beaker-puppet/pull/242) ([mhashizume](https://github.com/mhashizume))
121
- - README: remove obsolete transfer notice, update badges [\#241](https://github.com/puppetlabs/beaker-puppet/pull/241) ([kenyon](https://github.com/kenyon))
122
- - Add Unicorn to CODEONWERS [\#235](https://github.com/puppetlabs/beaker-puppet/pull/235) ([cthorn42](https://github.com/cthorn42))
123
- - Update CODEOWNERS [\#234](https://github.com/puppetlabs/beaker-puppet/pull/234) ([cthorn42](https://github.com/cthorn42))
124
- - rubocop: Update to voxpupuli-rubocop 2.1.0 [\#230](https://github.com/puppetlabs/beaker-puppet/pull/230) ([bastelfreak](https://github.com/bastelfreak))
125
120
  - Bump actions/checkout from 3 to 4 [\#227](https://github.com/puppetlabs/beaker-puppet/pull/227) ([dependabot[bot]](https://github.com/apps/dependabot))
126
121
  - Update voxpupuli-rubocop requirement from ~\> 1.2 to ~\> 2.0 [\#226](https://github.com/puppetlabs/beaker-puppet/pull/226) ([dependabot[bot]](https://github.com/apps/dependabot))
127
122
 
@@ -146,14 +141,12 @@ All notable changes to this project will be documented in this file.
146
141
 
147
142
  **Merged pull requests:**
148
143
 
149
- - release 2.0.0 [\#224](https://github.com/puppetlabs/beaker-puppet/pull/224) ([bastelfreak](https://github.com/bastelfreak))
150
144
  - Update fakefs requirement from \>= 0.6, \< 2.0 to \>= 0.6, \< 3.0 [\#222](https://github.com/puppetlabs/beaker-puppet/pull/222) ([dependabot[bot]](https://github.com/apps/dependabot))
151
145
  - rubocop: fix layout cops [\#221](https://github.com/puppetlabs/beaker-puppet/pull/221) ([bastelfreak](https://github.com/bastelfreak))
152
146
  - rubocop: fix style violations [\#220](https://github.com/puppetlabs/beaker-puppet/pull/220) ([bastelfreak](https://github.com/bastelfreak))
153
147
  - CI: Build gems with strictness and verbosity & dependencies: Add version constraints [\#219](https://github.com/puppetlabs/beaker-puppet/pull/219) ([bastelfreak](https://github.com/bastelfreak))
154
148
  - CI: apply Vox Pupuli best practices [\#217](https://github.com/puppetlabs/beaker-puppet/pull/217) ([bastelfreak](https://github.com/bastelfreak))
155
149
  - Drop in-parallel dependency [\#214](https://github.com/puppetlabs/beaker-puppet/pull/214) ([ekohl](https://github.com/ekohl))
156
- - Update in-parallel requirement from ~\> 0.1 to \>= 0.1, \< 2.0 [\#213](https://github.com/puppetlabs/beaker-puppet/pull/213) ([dependabot[bot]](https://github.com/apps/dependabot))
157
150
  - Bump actions/checkout from 2 to 3 [\#211](https://github.com/puppetlabs/beaker-puppet/pull/211) ([dependabot[bot]](https://github.com/apps/dependabot))
158
151
  - tests: Always set the platform as a Beaker::Platform instance [\#209](https://github.com/puppetlabs/beaker-puppet/pull/209) ([ekohl](https://github.com/ekohl))
159
152
  - dependabot: check for github actions [\#208](https://github.com/puppetlabs/beaker-puppet/pull/208) ([bastelfreak](https://github.com/bastelfreak))
@@ -172,7 +165,6 @@ All notable changes to this project will be documented in this file.
172
165
 
173
166
  **Merged pull requests:**
174
167
 
175
- - Release 1.29.0 [\#203](https://github.com/puppetlabs/beaker-puppet/pull/203) ([yachub](https://github.com/yachub))
176
168
  - \(maint\) Uses RFC 5737 IP space in example [\#200](https://github.com/puppetlabs/beaker-puppet/pull/200) ([mhashizume](https://github.com/mhashizume))
177
169
 
178
170
  ## [1.28.0](https://github.com/puppetlabs/beaker-puppet/tree/1.28.0) (2022-09-08)
@@ -183,10 +175,6 @@ All notable changes to this project will be documented in this file.
183
175
 
184
176
  - \(PA-4552\) Create ci:test:setup step for iterative workflow [\#194](https://github.com/puppetlabs/beaker-puppet/pull/194) ([joshcooper](https://github.com/joshcooper))
185
177
 
186
- **Merged pull requests:**
187
-
188
- - Release 1.28.0 [\#201](https://github.com/puppetlabs/beaker-puppet/pull/201) ([joshcooper](https://github.com/joshcooper))
189
-
190
178
  ## [1.27.0](https://github.com/puppetlabs/beaker-puppet/tree/1.27.0) (2022-08-31)
191
179
 
192
180
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/1.26.3...1.27.0)
@@ -221,7 +209,6 @@ All notable changes to this project will be documented in this file.
221
209
 
222
210
  **Merged pull requests:**
223
211
 
224
- - Release 1.26.2 [\#192](https://github.com/puppetlabs/beaker-puppet/pull/192) ([joshcooper](https://github.com/joshcooper))
225
212
  - \(PA-4178\) Only clear and add non-default gem sources [\#190](https://github.com/puppetlabs/beaker-puppet/pull/190) ([joshcooper](https://github.com/joshcooper))
226
213
 
227
214
  ## [1.26.1](https://github.com/puppetlabs/beaker-puppet/tree/1.26.1) (2022-03-24)
@@ -238,8 +225,6 @@ All notable changes to this project will be documented in this file.
238
225
 
239
226
  **Merged pull requests:**
240
227
 
241
- - Release 1.26.1 [\#189](https://github.com/puppetlabs/beaker-puppet/pull/189) ([mhashizume](https://github.com/mhashizume))
242
- - Release 1.26.0 [\#187](https://github.com/puppetlabs/beaker-puppet/pull/187) ([mhashizume](https://github.com/mhashizume))
243
228
  - \(PA-4332\) Changes download links to HTTPS [\#185](https://github.com/puppetlabs/beaker-puppet/pull/185) ([mhashizume](https://github.com/mhashizume))
244
229
 
245
230
  ## [1.26.0](https://github.com/puppetlabs/beaker-puppet/tree/1.26.0) (2022-03-23)
@@ -258,10 +243,6 @@ All notable changes to this project will be documented in this file.
258
243
 
259
244
  - \(PA-4331\) Fix the logic to only run on older solaris versions [\#183](https://github.com/puppetlabs/beaker-puppet/pull/183) ([cthorn42](https://github.com/cthorn42))
260
245
 
261
- **Merged pull requests:**
262
-
263
- - Release 1.25.0 [\#184](https://github.com/puppetlabs/beaker-puppet/pull/184) ([bastelfreak](https://github.com/bastelfreak))
264
-
265
246
  ## [1.24.0](https://github.com/puppetlabs/beaker-puppet/tree/1.24.0) (2022-03-04)
266
247
 
267
248
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/1.23.0...1.24.0)
@@ -272,11 +253,9 @@ All notable changes to this project will be documented in this file.
272
253
 
273
254
  **Merged pull requests:**
274
255
 
275
- - Release 1.24.0 [\#181](https://github.com/puppetlabs/beaker-puppet/pull/181) ([bastelfreak](https://github.com/bastelfreak))
276
256
  - gemspec: fix typo in Apache-2.0 license [\#180](https://github.com/puppetlabs/beaker-puppet/pull/180) ([bastelfreak](https://github.com/bastelfreak))
277
257
  - Add Ruby 3.1 to CI [\#179](https://github.com/puppetlabs/beaker-puppet/pull/179) ([bastelfreak](https://github.com/bastelfreak))
278
258
  - Depend on Ruby 2.4 or newer in gemspec [\#178](https://github.com/puppetlabs/beaker-puppet/pull/178) ([bastelfreak](https://github.com/bastelfreak))
279
- - Release 1.23.0 [\#175](https://github.com/puppetlabs/beaker-puppet/pull/175) ([cthorn42](https://github.com/cthorn42))
280
259
 
281
260
  ## [1.23.0](https://github.com/puppetlabs/beaker-puppet/tree/1.23.0) (2022-02-23)
282
261
 
@@ -297,7 +276,6 @@ All notable changes to this project will be documented in this file.
297
276
 
298
277
  **Merged pull requests:**
299
278
 
300
- - Release 1.22.2 [\#171](https://github.com/puppetlabs/beaker-puppet/pull/171) ([bastelfreak](https://github.com/bastelfreak))
301
279
  - Fix install\_puppet\_on on el8 [\#170](https://github.com/puppetlabs/beaker-puppet/pull/170) ([gcampbell12](https://github.com/gcampbell12))
302
280
 
303
281
  ## [1.22.1](https://github.com/puppetlabs/beaker-puppet/tree/1.22.1) (2021-08-19)
@@ -306,7 +284,6 @@ All notable changes to this project will be documented in this file.
306
284
 
307
285
  **Merged pull requests:**
308
286
 
309
- - Prep for 1.22.1 release [\#169](https://github.com/puppetlabs/beaker-puppet/pull/169) ([tvpartytonight](https://github.com/tvpartytonight))
310
287
  - Revert "Use the built-in Resolv::IPv4::Regex" [\#168](https://github.com/puppetlabs/beaker-puppet/pull/168) ([kenyon](https://github.com/kenyon))
311
288
 
312
289
  ## [1.22.0](https://github.com/puppetlabs/beaker-puppet/tree/1.22.0) (2021-08-17)
@@ -320,10 +297,8 @@ All notable changes to this project will be documented in this file.
320
297
 
321
298
  **Merged pull requests:**
322
299
 
323
- - Regenerate v1.22 changelog [\#167](https://github.com/puppetlabs/beaker-puppet/pull/167) ([bastelfreak](https://github.com/bastelfreak))
324
300
  - Remove mentions of Beaker 3 [\#165](https://github.com/puppetlabs/beaker-puppet/pull/165) ([ekohl](https://github.com/ekohl))
325
301
  - Use the built-in Resolv::IPv4::Regex [\#164](https://github.com/puppetlabs/beaker-puppet/pull/164) ([ekohl](https://github.com/ekohl))
326
- - release 1.22.0 [\#163](https://github.com/puppetlabs/beaker-puppet/pull/163) ([bastelfreak](https://github.com/bastelfreak))
327
302
  - Implement codecov; update README.md [\#162](https://github.com/puppetlabs/beaker-puppet/pull/162) ([bastelfreak](https://github.com/bastelfreak))
328
303
  - Add both GPG keys when installing repos on SLES [\#157](https://github.com/puppetlabs/beaker-puppet/pull/157) ([GabrielNagy](https://github.com/GabrielNagy))
329
304
 
@@ -335,16 +310,10 @@ All notable changes to this project will be documented in this file.
335
310
 
336
311
  - Fix Arch Linux support [\#154](https://github.com/puppetlabs/beaker-puppet/pull/154) ([bastelfreak](https://github.com/bastelfreak))
337
312
 
338
- **Closed issues:**
339
-
340
- - Useless 'PATH' string prepended to PATH environment variable [\#151](https://github.com/puppetlabs/beaker-puppet/issues/151)
341
-
342
313
  **Merged pull requests:**
343
314
 
344
315
  - \(\#151\) Remove useless 'PATH' string from system PATH [\#152](https://github.com/puppetlabs/beaker-puppet/pull/152) ([silug](https://github.com/silug))
345
- - Release 1.21.0 with proper changelog [\#150](https://github.com/puppetlabs/beaker-puppet/pull/150) ([bastelfreak](https://github.com/bastelfreak))
346
316
  - \(maint\) replace use of deprecated method `get_puppet_collection` [\#149](https://github.com/puppetlabs/beaker-puppet/pull/149) ([ciprianbadescu](https://github.com/ciprianbadescu))
347
- - Convert workflow to Github Actions [\#148](https://github.com/puppetlabs/beaker-puppet/pull/148) ([ekohl](https://github.com/ekohl))
348
317
  - \(maint\) Make latest the latest stable instead of nightly [\#147](https://github.com/puppetlabs/beaker-puppet/pull/147) ([GabrielNagy](https://github.com/GabrielNagy))
349
318
  - \(maint\) Remove deprecated gem install flags [\#146](https://github.com/puppetlabs/beaker-puppet/pull/146) ([gimmyxd](https://github.com/gimmyxd))
350
319
  - \(maint\) redhat-8-arm64 builds access check [\#145](https://github.com/puppetlabs/beaker-puppet/pull/145) ([ciprianbadescu](https://github.com/ciprianbadescu))
@@ -662,11 +662,52 @@ module Beaker
662
662
  endpoint = 'status/v1/services/puppetdb-status'
663
663
  expected_regex = '\"state\" \{0,\}: \{0,\}\"running\"'
664
664
  end
665
- retry_on(host,
666
- "curl -m 1 http://localhost:#{nonssl_port}/#{endpoint} | grep '#{expected_regex}'",
667
- { max_retries: 120 })
668
- curl_with_retries('start puppetdb (ssl)',
669
- host, "https://#{host.node_name}:#{ssl_port}", [35, 60])
665
+ # Confirm readiness -- not just liveness -- over the ssl status port,
666
+ # which is always enabled. /status/v1/* (and the pre-4.0 /pdb/meta
667
+ # fallback) is allow-unauthenticated and PuppetDB's jetty listener is
668
+ # client-auth=want, so `curl -k` gets a real, content-validated body
669
+ # with no client cert, and it works even when the cleartext listener
670
+ # is disabled by default (PE-45384/PE-44906, SECVULN-1792).
671
+ #
672
+ # PE-45697 could no longer perform this running-state validation once
673
+ # it had to stop relying on the (now disabled-by-default) cleartext
674
+ # port: it fell back to a bare curl_with_retries liveness probe, which
675
+ # only confirms the tls port answers, not that puppetdb reports a
676
+ # running state -- reopening the "port up but not ready" race the
677
+ # nonssl content check used to guard. Restore that check over ssl.
678
+ ssl_status_command = "curl -m 1 -k https://localhost:#{ssl_port}/#{endpoint} | grep '#{expected_regex}'"
679
+ begin
680
+ result = retry_on(host, ssl_status_command, { max_retries: 60 })
681
+ rescue RuntimeError => e
682
+ # Only treat this as the known "exhausted all retries" failure
683
+ # retry_on itself raises for THIS command (a plain RuntimeError with
684
+ # this exact templated message, see beaker's
685
+ # Beaker::DSL::Helpers::HostHelpers#retry_on) -- not any other
686
+ # RuntimeError, or a same-shaped error for a different command, that
687
+ # might surface from deeper in the retry loop (e.g. an SSH/connection
688
+ # error from the underlying on() call).
689
+ raise unless e.message == "Command `#{ssl_status_command}` failed."
690
+
691
+ # The ssl status endpoint didn't serve unauthenticated content
692
+ # (older or nonstandard config). Degrade to the previous behaviour
693
+ # rather than failing: a bare ssl liveness probe, plus a best-effort
694
+ # nonssl content check whose absence -- by design, on a host with the
695
+ # cleartext listener disabled -- must not fail this method.
696
+ logger.warn("sleep_until_puppetdb_started: ssl status content check did not confirm a running state (#{e.message}); falling back to an ssl liveness probe")
697
+ result = curl_with_retries('start puppetdb (ssl)',
698
+ host, "https://#{host.node_name}:#{ssl_port}", [35, 60])
699
+
700
+ nonssl_status_command = "curl -m 1 http://localhost:#{nonssl_port}/#{endpoint} | grep '#{expected_regex}'"
701
+ begin
702
+ retry_on(host, nonssl_status_command, { max_retries: 5 })
703
+ rescue RuntimeError => nonssl_error
704
+ raise unless nonssl_error.message == "Command `#{nonssl_status_command}` failed."
705
+
706
+ logger.warn("sleep_until_puppetdb_started: nonssl status check on port #{nonssl_port} did not succeed (#{nonssl_error.message}), but ssl liveness was confirmed")
707
+ end
708
+ end
709
+
710
+ result
670
711
  end
671
712
 
672
713
  # Waits until a successful curl check has happened against puppetserver
@@ -29,7 +29,7 @@ module Beaker
29
29
  GitURI = %r{^(git|https?|file)://|^git@|^gitmirror@}
30
30
 
31
31
  # Github's ssh signature for cloning via ssh
32
- GitHubSig = 'github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
32
+ GitHubSig = 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' # rubocop:disable Layout/LineLength
33
33
 
34
34
  # Merge given options with our default options in a consistent way
35
35
  # This will remove any nil values so that we always have a set default.
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '4.4.1'
2
+ VERSION = '4.4.3'
3
3
  end
@@ -1034,53 +1034,121 @@ describe ClassMixedWithDSLHelpers do
1034
1034
  allow(subject).to receive(:version_is_less).and_return(true)
1035
1035
  end
1036
1036
 
1037
- it 'uses the default ports if none given' do
1037
+ it 'content-validates over the ssl status port and, on success, never touches the cleartext port' do
1038
1038
  host = hosts[0]
1039
- expect(subject).to receive(:retry_on).with(anything, /8080/, anything).once.ordered
1040
- expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, anything).once.ordered
1041
- subject.sleep_until_puppetdb_started(host)
1042
- end
1039
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once
1040
+ expect(subject).not_to receive(:curl_with_retries)
1041
+ expect(subject).not_to receive(:retry_on).with(anything, %r{http://localhost:8080/}, anything)
1043
1042
 
1044
- it 'allows setting the nonssl_port' do
1045
- host = hosts[0]
1046
- expect(subject).to receive(:retry_on).with(anything, /8084/, anything).once.ordered
1047
- expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, anything).once.ordered
1048
-
1049
- subject.sleep_until_puppetdb_started(host, 8084)
1043
+ subject.sleep_until_puppetdb_started(host)
1050
1044
  end
1051
1045
 
1052
1046
  it 'allows setting the ssl_port' do
1053
1047
  host = hosts[0]
1054
- expect(subject).to receive(:retry_on).with(anything, /8080/, anything).once.ordered
1055
- expect(subject).to receive(:curl_with_retries).with(anything, anything, /8085/, anything).once.ordered
1048
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8085/}, { max_retries: 60 }).once
1056
1049
 
1057
1050
  subject.sleep_until_puppetdb_started(host, nil, 8085)
1058
1051
  end
1059
1052
 
1060
1053
  context 'when pe_ver is less than 2016.1.0' do
1061
- it 'uses the version endpoint' do
1054
+ it 'content-validates the version endpoint over ssl' do
1062
1055
  host = hosts[0]
1063
1056
  host['pe_ver'] = '2015.3.3'
1064
- expect(subject).to receive(:retry_on).with(anything, %r{pdb/meta/v1/version}, anything).once.ordered
1065
- expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, anything).once.ordered
1066
-
1067
1057
  expect(subject).to receive(:version_is_less).with(host['pe_ver'], '2016.1.0').and_return(true)
1058
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/pdb/meta/v1/version},
1059
+ { max_retries: 60 }).once
1060
+
1068
1061
  subject.sleep_until_puppetdb_started(host)
1069
1062
  end
1070
1063
  end
1071
1064
 
1072
1065
  context 'when pe_ver is greater than 2015.9.9' do
1073
- it 'uses the status endpoint' do
1066
+ it 'content-validates the status endpoint over ssl' do
1074
1067
  host = hosts[0]
1075
1068
  host['pe_ver'] = '2016.1.0'
1076
- expect(subject).to receive(:retry_on).with(anything, %r{status/v1/services/puppetdb-status},
1077
- anything).once.ordered
1078
- expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, anything).once.ordered
1079
-
1080
1069
  expect(subject).to receive(:version_is_less).with(host['pe_ver'], '2016.1.0').and_return(false)
1070
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/status/v1/services/puppetdb-status},
1071
+ { max_retries: 60 }).once
1072
+
1081
1073
  subject.sleep_until_puppetdb_started(host)
1082
1074
  end
1083
1075
  end
1076
+
1077
+ context 'when the ssl status endpoint does not serve unauthenticated content' do
1078
+ # Older/nonstandard configs: degrade to the previous behaviour rather
1079
+ # than failing -- a bare ssl liveness probe plus a best-effort nonssl
1080
+ # content check.
1081
+ it 'falls back to an ssl liveness probe and a nonssl content check' do
1082
+ host = hosts[0]
1083
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once.ordered do |_host, command, _opts|
1084
+ raise "Command `#{command}` failed."
1085
+ end
1086
+ expect(subject).to receive(:curl_with_retries).with(anything, anything, %r{https://[^/]*:8081}, [35, 60]).once.ordered
1087
+ expect(subject).to receive(:retry_on).with(anything, %r{http://localhost:8080/}, { max_retries: 5 }).once.ordered
1088
+
1089
+ expect { subject.sleep_until_puppetdb_started(host) }.not_to raise_error
1090
+ end
1091
+
1092
+ it 'allows setting the nonssl_port in the fallback path' do
1093
+ host = hosts[0]
1094
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once.ordered do |_host, command, _opts|
1095
+ raise "Command `#{command}` failed."
1096
+ end
1097
+ expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, [35, 60]).once.ordered
1098
+ expect(subject).to receive(:retry_on).with(anything, %r{http://localhost:8084/}, { max_retries: 5 }).once.ordered
1099
+
1100
+ subject.sleep_until_puppetdb_started(host, 8084)
1101
+ end
1102
+
1103
+ context 'and the cleartext status port never responds (e.g. disabled by default)' do
1104
+ it 'swallows the nonssl failure once ssl liveness is confirmed' do
1105
+ host = hosts[0]
1106
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once.ordered do |_host, command, _opts|
1107
+ raise "Command `#{command}` failed."
1108
+ end
1109
+ expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, [35, 60]).once.ordered
1110
+ expect(subject).to receive(:retry_on).with(anything, %r{http://localhost:8080/}, { max_retries: 5 }).once.ordered do |_host, command, _opts|
1111
+ raise "Command `#{command}` failed."
1112
+ end
1113
+
1114
+ expect { subject.sleep_until_puppetdb_started(host) }.not_to raise_error
1115
+ end
1116
+
1117
+ it 'propagates an unrelated RuntimeError from the nonssl check' do
1118
+ host = hosts[0]
1119
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once.ordered do |_host, command, _opts|
1120
+ raise "Command `#{command}` failed."
1121
+ end
1122
+ expect(subject).to receive(:curl_with_retries).with(anything, anything, /8081/, [35, 60]).once.ordered
1123
+ expect(subject).to receive(:retry_on).with(anything, %r{http://localhost:8080/}, { max_retries: 5 }).once.ordered
1124
+ .and_raise('Host unreachable: no route to host')
1125
+
1126
+ expect { subject.sleep_until_puppetdb_started(host) }.to raise_error(/Host unreachable/)
1127
+ end
1128
+ end
1129
+ end
1130
+
1131
+ context 'when the ssl content check raises a RuntimeError unrelated to exhausted retries' do
1132
+ it 'propagates the error rather than falling back' do
1133
+ host = hosts[0]
1134
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once
1135
+ .and_raise('Host unreachable: no route to host')
1136
+ expect(subject).not_to receive(:curl_with_retries)
1137
+
1138
+ expect { subject.sleep_until_puppetdb_started(host) }.to raise_error(/Host unreachable/)
1139
+ end
1140
+ end
1141
+
1142
+ context 'when the ssl content check raises the templated failure but for a different command' do
1143
+ it 'propagates the error rather than falling back' do
1144
+ host = hosts[0]
1145
+ expect(subject).to receive(:retry_on).with(anything, %r{-k https://localhost:8081/}, { max_retries: 60 }).once
1146
+ .and_raise('Command `some other command` failed.')
1147
+ expect(subject).not_to receive(:curl_with_retries)
1148
+
1149
+ expect { subject.sleep_until_puppetdb_started(host) }.to raise_error(/some other command/)
1150
+ end
1151
+ end
1084
1152
  end
1085
1153
 
1086
1154
  describe '#sleep_until_puppetserver_started' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.1
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-20 00:00:00.000000000 Z
11
+ date: 2026-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fakefs