beaker 5.2.0 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +1 -1
  3. data/.github/workflows/test.yml +1 -1
  4. data/.rubocop.yml +1 -2
  5. data/.rubocop_todo.yml +54 -2
  6. data/CHANGELOG.md +81 -18
  7. data/Gemfile +1 -0
  8. data/acceptance/lib/helpers/test_helper.rb +2 -2
  9. data/acceptance/tests/base/dsl/helpers/configuration_test.rb +1 -0
  10. data/acceptance/tests/base/dsl/helpers/hocon_helpers_test.rb +5 -2
  11. data/acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb +5 -1
  12. data/acceptance/tests/base/dsl/helpers/host_helpers/backup_the_file_test.rb +3 -0
  13. data/acceptance/tests/base/dsl/helpers/host_helpers/check_for_package_test.rb +6 -0
  14. data/acceptance/tests/base/dsl/helpers/host_helpers/create_remote_file_test.rb +6 -0
  15. data/acceptance/tests/base/dsl/helpers/host_helpers/curl_on_test.rb +2 -0
  16. data/acceptance/tests/base/dsl/helpers/host_helpers/echo_on_test.rb +3 -1
  17. data/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb +10 -1
  18. data/acceptance/tests/base/dsl/helpers/host_helpers/retry_on_test.rb +1 -0
  19. data/acceptance/tests/base/dsl/helpers/host_helpers/rsync_to_test.rb +2 -0
  20. data/acceptance/tests/base/dsl/helpers/host_helpers/run_cron_on_test.rb +13 -0
  21. data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_on_test.rb +2 -0
  22. data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_test.rb +2 -0
  23. data/acceptance/tests/base/dsl/helpers/host_helpers/scp_from_test.rb +2 -0
  24. data/acceptance/tests/base/dsl/helpers/host_helpers/scp_to_test.rb +2 -0
  25. data/acceptance/tests/base/dsl/helpers/host_helpers/shell_test.rb +5 -0
  26. data/acceptance/tests/base/dsl/helpers/host_helpers/upgrade_package_test.rb +2 -0
  27. data/acceptance/tests/base/host/file_test.rb +7 -0
  28. data/acceptance/tests/base/host/host_test.rb +27 -4
  29. data/acceptance/tests/base/host_prebuilt_steps/ssh_environment_test.rb +3 -3
  30. data/acceptance/tests/hypervisor/communication_test.rb +1 -1
  31. data/beaker.gemspec +7 -4
  32. data/lib/beaker/options/command_line_parser.rb +1 -1
  33. data/lib/beaker/test_case.rb +1 -1
  34. data/lib/beaker/version.rb +1 -1
  35. data/lib/beaker.rb +1 -1
  36. data/spec/beaker/dsl/assertions_spec.rb +1 -1
  37. data/spec/beaker/dsl/structure_spec.rb +5 -5
  38. data/spec/beaker/host/mac/group_spec.rb +1 -1
  39. data/spec/beaker/host/mac/user_spec.rb +1 -1
  40. metadata +47 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d16043faca3a48ef9dd5a7171bf0241dd30fd801029eba8e881fe9d3d8afbef1
4
- data.tar.gz: 64bec8b91441d824ad87a112914a5f41b5fe2b48131b9f6d99599b201279b4a3
3
+ metadata.gz: 9b23a9cf4e69c1cc33d3b64319de5e01485d051f72b307bb4ba3e710bba1b2ee
4
+ data.tar.gz: 207b9b9829b4e2fed7108ae8c20aedc8da77c52c82ff7bbe44f02e79bc01f97b
5
5
  SHA512:
6
- metadata.gz: 17f0baf5a669e5ffa2e9f4214dbeb84f0e5fbf4ff80e048243215006aa8e5fc91be5df24e1714f71962a7a1d2e3d4f83c74c987f98a9a8ceff2b9397762b5167
7
- data.tar.gz: 2826c21940af588185545f7a4f987600a789a9c646b9fe0d31d9e6d6f4f5eae0573d51591de0943d0dc9077cb0e0f3114291881fc10c6dcd3b54af24ec2425e2
6
+ metadata.gz: 62d8f5a82f380bcc4d0e19a92d002eafe2a882e1c4dd48b322596b6c002e41efa78722337b26715850caff8b8fb788e8e89979d9fdd2fdcd61554ea755e6f972
7
+ data.tar.gz: d99dab4be804d55f0434d8a3671e5c6911dba5ad3b6e8b76d0c19a8e09ca4a11dd8463bac3726fc60d4311886325d6e1a2b9dd6bc924e57e8bdfc5303f69b099
@@ -18,7 +18,7 @@ jobs:
18
18
  env:
19
19
  BUNDLE_WITHOUT: release:development:rubocop
20
20
  - name: Build gem
21
- run: gem build *.gemspec
21
+ run: gem build --strict --verbose *.gemspec
22
22
  - name: Publish gem to rubygems.org
23
23
  run: gem push *.gem
24
24
  env:
@@ -45,7 +45,7 @@ jobs:
45
45
  ruby-version: ${{ matrix.ruby }}
46
46
  bundler-cache: true
47
47
  - name: Build gem
48
- run: gem build *.gemspec
48
+ run: gem build --strict --verbose *.gemspec
49
49
  - name: Run unit tests
50
50
  run: bundle exec rake spec
51
51
  - name: Run acceptance tests
data/.rubocop.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  ---
2
- inherit_from:
3
- - .rubocop_todo.yml
2
+ inherit_from: .rubocop_todo.yml
4
3
 
5
4
  inherit_gem:
6
5
  voxpupuli-rubocop: rubocop.yml
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,12 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
3
- # using RuboCop version 1.50.1.
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-05-30 09:17:22 UTC using RuboCop version 1.50.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 15
9
10
  # Configuration parameters: AllowedMethods.
10
11
  # AllowedMethods: enums
11
12
  Lint/ConstantDefinitionInBlock:
@@ -26,6 +27,7 @@ Lint/ConstantDefinitionInBlock:
26
27
  - 'spec/beaker/host/windows/pkg_spec.rb'
27
28
  - 'spec/beaker/options/hosts_file_parser_spec.rb'
28
29
 
30
+ # Offense count: 17
29
31
  # Configuration parameters: AllowComments, AllowEmptyLambdas.
30
32
  Lint/EmptyBlock:
31
33
  Exclude:
@@ -35,16 +37,19 @@ Lint/EmptyBlock:
35
37
  - 'spec/beaker/logger_junit_spec.rb'
36
38
  - 'spec/beaker/logger_spec.rb'
37
39
 
40
+ # Offense count: 1
38
41
  # This cop supports unsafe autocorrection (--autocorrect-all).
39
42
  Lint/NonAtomicFileOperation:
40
43
  Exclude:
41
44
  - 'acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb'
42
45
 
46
+ # Offense count: 2
43
47
  Lint/RescueException:
44
48
  Exclude:
45
49
  - 'lib/beaker/dsl/structure.rb'
46
50
  - 'lib/beaker/test_suite_result.rb'
47
51
 
52
+ # Offense count: 27
48
53
  Lint/ShadowingOuterLocalVariable:
49
54
  Exclude:
50
55
  - 'lib/beaker/dsl/helpers/host_helpers.rb'
@@ -55,6 +60,7 @@ Lint/ShadowingOuterLocalVariable:
55
60
  - 'lib/beaker/host_prebuilt_steps.rb'
56
61
  - 'lib/beaker/perf.rb'
57
62
 
63
+ # Offense count: 12
58
64
  Lint/UselessAssignment:
59
65
  Exclude:
60
66
  - 'acceptance/tests/base/dsl/helpers/host_helpers/curl_with_retries_test.rb'
@@ -62,6 +68,29 @@ Lint/UselessAssignment:
62
68
  - 'lib/beaker/dsl/helpers/host_helpers.rb'
63
69
  - 'lib/beaker/logger_junit.rb'
64
70
 
71
+ # Offense count: 5
72
+ # This cop supports unsafe autocorrection (--autocorrect-all).
73
+ Minitest/AssertTruthy:
74
+ Exclude:
75
+ - 'acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb'
76
+ - 'acceptance/tests/base/host/host_test.rb'
77
+ - 'acceptance/tests/hypervisor/communication_test.rb'
78
+
79
+ # Offense count: 2
80
+ # Configuration parameters: Severity.
81
+ Minitest/AssertWithExpectedArgument:
82
+ Exclude:
83
+ - 'acceptance/tests/base/dsl/helpers/hocon_helpers_test.rb'
84
+
85
+ # Offense count: 9
86
+ # This cop supports unsafe autocorrection (--autocorrect-all).
87
+ Minitest/RefuteFalse:
88
+ Exclude:
89
+ - 'acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb'
90
+ - 'acceptance/tests/base/dsl/helpers/host_helpers/check_for_package_test.rb'
91
+ - 'acceptance/tests/base/host/host_test.rb'
92
+
93
+ # Offense count: 20
65
94
  # Configuration parameters: ForbiddenDelimiters.
66
95
  # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
67
96
  Naming/HeredocDelimiterNaming:
@@ -77,6 +106,7 @@ Naming/HeredocDelimiterNaming:
77
106
  - 'spec/beaker/host/windows_spec.rb'
78
107
  - 'spec/beaker/test_case_spec.rb'
79
108
 
109
+ # Offense count: 2
80
110
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
81
111
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
82
112
  Naming/MemoizedInstanceVariableName:
@@ -84,6 +114,7 @@ Naming/MemoizedInstanceVariableName:
84
114
  - 'lib/beaker/host.rb'
85
115
  - 'lib/beaker/options/presets.rb'
86
116
 
117
+ # Offense count: 4
87
118
  # Configuration parameters: MinSize.
88
119
  Performance/CollectionLiteralInLoop:
89
120
  Exclude:
@@ -91,11 +122,13 @@ Performance/CollectionLiteralInLoop:
91
122
  - 'lib/beaker/dsl/structure.rb'
92
123
  - 'lib/beaker/test_suite_result.rb'
93
124
 
125
+ # Offense count: 17
94
126
  RSpec/AnyInstance:
95
127
  Exclude:
96
128
  - 'spec/beaker/host/windows/file_spec.rb'
97
129
  - 'spec/beaker/subcommand_spec.rb'
98
130
 
131
+ # Offense count: 12
99
132
  # This cop supports unsafe autocorrection (--autocorrect-all).
100
133
  RSpec/BeEq:
101
134
  Exclude:
@@ -104,15 +137,18 @@ RSpec/BeEq:
104
137
  - 'spec/beaker/host/windows/exec_spec.rb'
105
138
  - 'spec/beaker/host_spec.rb'
106
139
 
140
+ # Offense count: 121
107
141
  # Configuration parameters: Prefixes, AllowedPatterns.
108
142
  # Prefixes: when, with, without
109
143
  RSpec/ContextWording:
110
144
  Enabled: false
111
145
 
146
+ # Offense count: 239
112
147
  # Configuration parameters: CountAsOne.
113
148
  RSpec/ExampleLength:
114
149
  Max: 44
115
150
 
151
+ # Offense count: 27
116
152
  RSpec/ExpectInHook:
117
153
  Exclude:
118
154
  - 'spec/beaker/cli_spec.rb'
@@ -124,6 +160,7 @@ RSpec/ExpectInHook:
124
160
  - 'spec/beaker/options/parser_spec.rb'
125
161
  - 'spec/beaker/ssh_connection_spec.rb'
126
162
 
163
+ # Offense count: 22
127
164
  # Configuration parameters: AssignmentOnly.
128
165
  RSpec/InstanceVariable:
129
166
  Exclude:
@@ -133,10 +170,12 @@ RSpec/InstanceVariable:
133
170
  - 'spec/beaker/dsl/test_tagging_spec.rb'
134
171
  - 'spec/beaker/host_prebuilt_steps_spec.rb'
135
172
 
173
+ # Offense count: 3
136
174
  RSpec/IteratedExpectation:
137
175
  Exclude:
138
176
  - 'spec/beaker/dsl/helpers/host_helpers_spec.rb'
139
177
 
178
+ # Offense count: 12
140
179
  RSpec/LeakyConstantDeclaration:
141
180
  Exclude:
142
181
  - 'spec/beaker/host/freebsd/exec_spec.rb'
@@ -152,19 +191,23 @@ RSpec/LeakyConstantDeclaration:
152
191
  - 'spec/beaker/host/windows/pkg_spec.rb'
153
192
  - 'spec/beaker/options/hosts_file_parser_spec.rb'
154
193
 
194
+ # Offense count: 1
155
195
  RSpec/MultipleDescribes:
156
196
  Exclude:
157
197
  - 'spec/beaker/dsl/test_tagging_spec.rb'
158
198
 
199
+ # Offense count: 134
159
200
  # Configuration parameters: AllowSubject.
160
201
  RSpec/MultipleMemoizedHelpers:
161
202
  Max: 17
162
203
 
204
+ # Offense count: 500
163
205
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
164
206
  # SupportedStyles: always, named_only
165
207
  RSpec/NamedSubject:
166
208
  Enabled: false
167
209
 
210
+ # Offense count: 42
168
211
  # Configuration parameters: AllowedPatterns.
169
212
  # AllowedPatterns: ^expect_, ^assert_
170
213
  RSpec/NoExpectationExample:
@@ -175,17 +218,20 @@ RSpec/NoExpectationExample:
175
218
  - 'spec/beaker/logger_spec.rb'
176
219
  - 'spec/beaker/options/subcommand_options_parser_spec.rb'
177
220
 
221
+ # Offense count: 7
178
222
  RSpec/RepeatedDescription:
179
223
  Exclude:
180
224
  - 'spec/beaker/cli_spec.rb'
181
225
  - 'spec/beaker/host/unix/exec_spec.rb'
182
226
  - 'spec/beaker/host/unix/pkg_spec.rb'
183
227
 
228
+ # Offense count: 4
184
229
  RSpec/RepeatedExample:
185
230
  Exclude:
186
231
  - 'spec/beaker/dsl/roles_spec.rb'
187
232
  - 'spec/beaker/logger_spec.rb'
188
233
 
234
+ # Offense count: 178
189
235
  RSpec/SubjectStub:
190
236
  Exclude:
191
237
  - 'spec/beaker/dsl/assertions_spec.rb'
@@ -202,6 +248,7 @@ RSpec/SubjectStub:
202
248
  - 'spec/beaker/host/windows/user_spec.rb'
203
249
  - 'spec/beaker/host_prebuilt_steps_spec.rb'
204
250
 
251
+ # Offense count: 12
205
252
  RSpec/UnspecifiedException:
206
253
  Exclude:
207
254
  - 'spec/beaker/cli_spec.rb'
@@ -209,15 +256,18 @@ RSpec/UnspecifiedException:
209
256
  - 'spec/beaker/host_spec.rb'
210
257
  - 'spec/beaker/test_suite_spec.rb'
211
258
 
259
+ # Offense count: 86
212
260
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
213
261
  RSpec/VerifiedDoubles:
214
262
  Enabled: false
215
263
 
264
+ # Offense count: 2
216
265
  # This cop supports safe autocorrection (--autocorrect).
217
266
  Rake/Desc:
218
267
  Exclude:
219
268
  - 'Rakefile'
220
269
 
270
+ # Offense count: 7
221
271
  Security/Eval:
222
272
  Exclude:
223
273
  - 'Rakefile'
@@ -228,10 +278,12 @@ Security/Eval:
228
278
  - 'lib/beaker/options/options_file_parser.rb'
229
279
  - 'lib/beaker/test_case.rb'
230
280
 
281
+ # Offense count: 1
231
282
  Security/Open:
232
283
  Exclude:
233
284
  - 'lib/beaker/dsl/helpers/web_helpers.rb'
234
285
 
286
+ # Offense count: 104
235
287
  # This cop supports safe autocorrection (--autocorrect).
236
288
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
237
289
  # URISchemes: http, https
data/CHANGELOG.md CHANGED
@@ -1,63 +1,126 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.3.1](https://github.com/voxpupuli/beaker/tree/5.3.1) (2023-07-26)
4
+
5
+ **Fixed bugs:**
6
+
7
+ - Fix Minitest capitalization [\#1819](https://github.com/voxpupuli/beaker/pull/1819) ([mhashizume](https://github.com/mhashizume))
8
+
9
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/5.3.0...5.3.1)
10
+
11
+ ## [5.3.0](https://github.com/voxpupuli/beaker/tree/5.3.0) (2023-06-06)
12
+
13
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/5.2.0...5.3.0)
14
+
15
+ **Implemented enhancements:**
16
+
17
+ - Add bcrypt\_pbkdf to fix ed25519 ssh keys support [\#1810](https://github.com/voxpupuli/beaker/pull/1810) ([jay7x](https://github.com/jay7x))
18
+
19
+ **Merged pull requests:**
20
+
21
+ - rubocop: autofix [\#1816](https://github.com/voxpupuli/beaker/pull/1816) ([bastelfreak](https://github.com/bastelfreak))
22
+ - GCG: Add missing faraday dependency [\#1815](https://github.com/voxpupuli/beaker/pull/1815) ([bastelfreak](https://github.com/bastelfreak))
23
+ - Build gems with verbosity and strictness [\#1811](https://github.com/voxpupuli/beaker/pull/1811) ([bastelfreak](https://github.com/bastelfreak))
24
+
3
25
  ## [5.2.0](https://github.com/voxpupuli/beaker/tree/5.2.0) (2023-04-28)
4
26
 
27
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/5.1.0...5.2.0)
28
+
5
29
  **Implemented enhancements:**
6
30
 
7
- - Enhance documentation about roles [\#1800](https://github.com/voxpupuli/beaker/pull/1800) ([rwaffen](https://github.com/rwaffen))
8
31
  - Declare API interface on Beaker::Host [\#1806](https://github.com/voxpupuli/beaker/pull/1806) ([ekohl](https://github.com/ekohl))
32
+ - Switch to voxpupuli-rubocop [\#1804](https://github.com/voxpupuli/beaker/pull/1804) ([bastelfreak](https://github.com/bastelfreak))
9
33
  - Support an extension to tmpfile [\#1735](https://github.com/voxpupuli/beaker/pull/1735) ([ekohl](https://github.com/ekohl))
10
34
 
11
35
  **Fixed bugs:**
12
36
 
13
- - Use systemctl to restat SSH on EL9 [\#1808](https://github.com/voxpupuli/beaker/pull/1808) ([ekohl](https://github.com/ekohl))
37
+ - Use systemctl to restart SSH on EL9 [\#1808](https://github.com/voxpupuli/beaker/pull/1808) ([ekohl](https://github.com/ekohl))
14
38
 
15
- **Merged changes:**
39
+ **Closed issues:**
40
+
41
+ - Failed to exec 'vagrant up' \(rbenv, ruby 2.7.6, bundler 2.3.19, virtualbox\) [\#1752](https://github.com/voxpupuli/beaker/issues/1752)
42
+ - EL 9 error - /sbin/service: No such file or directory [\#1751](https://github.com/voxpupuli/beaker/issues/1751)
43
+
44
+ **Merged pull requests:**
16
45
 
17
- - Drop legacy yard tasks [\#1805](https://github.com/voxpupuli/beaker/pull/1805) ([bastelfreak](https://github.com/bastelfreak))
18
- - Switch to voxpupuli-rubocop [\#1804](https://github.com/voxpupuli/beaker/pull/1804) ([bastelfreak](https://github.com/bastelfreak))
19
46
  - Disable RSpec/IndexedLet [\#1807](https://github.com/voxpupuli/beaker/pull/1807) ([ekohl](https://github.com/ekohl))
47
+ - Drop legacy yard tasks [\#1805](https://github.com/voxpupuli/beaker/pull/1805) ([bastelfreak](https://github.com/bastelfreak))
48
+ - Enhance documentation about roles [\#1800](https://github.com/voxpupuli/beaker/pull/1800) ([rwaffen](https://github.com/rwaffen))
20
49
 
21
50
  ## [5.1.0](https://github.com/voxpupuli/beaker/tree/5.1.0) (2023-03-27)
22
51
 
52
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/5.0.0...5.1.0)
53
+
23
54
  **Implemented enhancements:**
24
55
 
25
56
  - Introduce shareable rubocop config [\#1795](https://github.com/voxpupuli/beaker/pull/1795) ([bastelfreak](https://github.com/bastelfreak))
26
57
 
27
58
  ## [5.0.0](https://github.com/voxpupuli/beaker/tree/5.0.0) (2023-03-24)
28
59
 
60
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/4.39.0...5.0.0)
61
+
29
62
  **Breaking changes:**
30
63
 
31
- - Drop Ruby 2.4/2.5/2.6 support [\#1767](https://github.com/voxpupuli/beaker/pull/1767) ([bastelfreak](https://github.com/bastelfreak))
32
- - Removes open_uri_redirections [\#1764](https://github.com/voxpupuli/beaker/pull/1764) ([mhashizume](https://github.com/mhashizume))
64
+ - Remove install\_puppet\_agent\_\* methods [\#1775](https://github.com/voxpupuli/beaker/pull/1775) ([ekohl](https://github.com/ekohl))
65
+ - Update fakefs requirement from ~\> 1.0 to ~\> 2.4 [\#1770](https://github.com/voxpupuli/beaker/pull/1770) ([dependabot[bot]](https://github.com/apps/dependabot))
33
66
  - Drop deprecated methods [\#1769](https://github.com/voxpupuli/beaker/pull/1769) ([ekohl](https://github.com/ekohl))
34
- - Remove add-el-extras, passenger, proxy_config, disable_iptables and clean up code [\#1731](https://github.com/voxpupuli/beaker/pull/1731) ([ekohl](https://github.com/ekohl))
35
- - Remove install_puppet_agent_* methods [\#1775](https://github.com/voxpupuli/beaker/pull/1775) ([ekohl](https://github.com/ekohl))
67
+ - Drop Ruby 2.4/2.5/2.6 support [\#1767](https://github.com/voxpupuli/beaker/pull/1767) ([bastelfreak](https://github.com/bastelfreak))
68
+ - \(maint\) Removes open\_uri\_redirections [\#1764](https://github.com/voxpupuli/beaker/pull/1764) ([mhashizume](https://github.com/mhashizume))
69
+ - Remove add-el-extras, passenger, proxy\_config, disable\_iptables and clean up code [\#1731](https://github.com/voxpupuli/beaker/pull/1731) ([ekohl](https://github.com/ekohl))
36
70
 
37
71
  **Implemented enhancements:**
38
72
 
39
- - Fix many RuboCop violations: [\#1768](https://github.com/voxpupuli/beaker/pull/1768), [\#1777](https://github.com/voxpupuli/beaker/pull/1777), [\#1787](https://github.com/voxpupuli/beaker/pull/1787), [\#1778](https://github.com/voxpupuli/beaker/pull/1778), [\#1790](https://github.com/voxpupuli/beaker/pull/1790), [\#1791](https://github.com/voxpupuli/beaker/pull/1791), [\#1792](https://github.com/voxpupuli/beaker/pull/1792)
73
+ - Drop rspec-its dependency in favor of have\_attributes [\#1788](https://github.com/voxpupuli/beaker/pull/1788) ([ekohl](https://github.com/ekohl))
40
74
  - Add Ruby 3.2 support [\#1762](https://github.com/voxpupuli/beaker/pull/1762) ([ekohl](https://github.com/ekohl))
41
- - Drop rspec-its dependency in favor of have_attributes [\#1788](https://github.com/voxpupuli/beaker/pull/1788)
42
75
 
43
- ## [4.39.0](https://github.com/voxpupuli/beaker/tree/4.39.0) (2023-02-09)
76
+ **Fixed bugs:**
77
+
78
+ - 4.39.0 breaks beaker-puppet tests [\#1772](https://github.com/voxpupuli/beaker/issues/1772)
79
+
80
+ **Merged pull requests:**
81
+
82
+ - Use send instead of instance\_eval [\#1793](https://github.com/voxpupuli/beaker/pull/1793) ([ekohl](https://github.com/ekohl))
83
+ - rubocop: Fix more Style cops [\#1792](https://github.com/voxpupuli/beaker/pull/1792) ([bastelfreak](https://github.com/bastelfreak))
84
+ - Rubocop: Fix more Style cops [\#1791](https://github.com/voxpupuli/beaker/pull/1791) ([bastelfreak](https://github.com/bastelfreak))
85
+ - Rubocop: Fix multiple Layout cops [\#1790](https://github.com/voxpupuli/beaker/pull/1790) ([bastelfreak](https://github.com/bastelfreak))
86
+ - Add a CI job we can enforce in branch protection [\#1789](https://github.com/voxpupuli/beaker/pull/1789) ([bastelfreak](https://github.com/bastelfreak))
87
+ - rubocop: disable Gemspec/DevelopmentDependencies [\#1787](https://github.com/voxpupuli/beaker/pull/1787) ([bastelfreak](https://github.com/bastelfreak))
88
+ - Release pipeline: Dont install optional gems [\#1786](https://github.com/voxpupuli/beaker/pull/1786) ([bastelfreak](https://github.com/bastelfreak))
89
+ - CI: Run on merges to master [\#1785](https://github.com/voxpupuli/beaker/pull/1785) ([bastelfreak](https://github.com/bastelfreak))
90
+ - Run acceptance tests in CI [\#1784](https://github.com/voxpupuli/beaker/pull/1784) ([ekohl](https://github.com/ekohl))
91
+ - Update in-parallel requirement from ~\> 0.1 to \>= 0.1, \< 2.0 [\#1783](https://github.com/voxpupuli/beaker/pull/1783) ([dependabot[bot]](https://github.com/apps/dependabot))
92
+ - Update rubocop-rspec requirement from ~\> 2.18.1 to ~\> 2.19.0 [\#1781](https://github.com/voxpupuli/beaker/pull/1781) ([dependabot[bot]](https://github.com/apps/dependabot))
93
+ - Update rubocop requirement from ~\> 1.47.0 to ~\> 1.48.0 [\#1780](https://github.com/voxpupuli/beaker/pull/1780) ([dependabot[bot]](https://github.com/apps/dependabot))
94
+ - dependabot: check for github actions as well [\#1779](https://github.com/voxpupuli/beaker/pull/1779) ([bastelfreak](https://github.com/bastelfreak))
95
+ - RuboCop: Fix Layout cops [\#1778](https://github.com/voxpupuli/beaker/pull/1778) ([bastelfreak](https://github.com/bastelfreak))
96
+ - Fix more rubocop violations [\#1777](https://github.com/voxpupuli/beaker/pull/1777) ([bastelfreak](https://github.com/bastelfreak))
97
+ - Use Enumerable\#all? [\#1776](https://github.com/voxpupuli/beaker/pull/1776) ([ekohl](https://github.com/ekohl))
98
+ - Do not include Unix::Exec on Windows::Exec tests [\#1774](https://github.com/voxpupuli/beaker/pull/1774) ([ekohl](https://github.com/ekohl))
99
+ - Update rubocop requirement from ~\> 1.45.0 to ~\> 1.47.0 [\#1773](https://github.com/voxpupuli/beaker/pull/1773) ([dependabot[bot]](https://github.com/apps/dependabot))
100
+ - rubocop: Fix commas and whitespace and newlines [\#1768](https://github.com/voxpupuli/beaker/pull/1768) ([bastelfreak](https://github.com/bastelfreak))
101
+ - CI: Use latest actions/checkout version [\#1766](https://github.com/voxpupuli/beaker/pull/1766) ([bastelfreak](https://github.com/bastelfreak))
102
+
103
+ ## [4.39.0](https://github.com/voxpupuli/beaker/tree/4.39.0) (2023-02-18)
44
104
 
45
105
  [Full Changelog](https://github.com/voxpupuli/beaker/compare/4.38.1...4.39.0)
46
106
 
47
- **Fixed bugs:**
107
+ **Implemented enhancements:**
48
108
 
49
- - Extend list of permitted classes for YAML safe load and allow aliases [\#1758](https://github.com/voxpupuli/beaker/pull/1758) ([nmburgan](https://github.com/nmburgan))
109
+ - \(maint\) StringInclude Rubocop corrections [\#1765](https://github.com/voxpupuli/beaker/pull/1765) ([mhashizume](https://github.com/mhashizume))
110
+ - Add Rubocop [\#1761](https://github.com/voxpupuli/beaker/pull/1761) ([ekohl](https://github.com/ekohl))
50
111
 
51
- **Implemented enhancements:**
112
+ **Fixed bugs:**
52
113
 
53
- - Add RuboCop [\#1761](https://github.com/voxpupuli/beaker/pull/1761) ([ekohl](https://github.com/ekohl))
54
- - Update net-scp requirement from >= 1.2, < 4.0 to >= 1.2, < 5.0 [\#1757](https://github.com/voxpupuli/beaker/pull/1757)
55
- - (maint) StringInclude Rubocop corrections [\1765](https://github.com/voxpupuli/beaker/pull/1765) ([mhashizume](https://github.com/mhashizume))
114
+ - Extend list of permitted classes for YAML safe load and allow aliases [\#1758](https://github.com/voxpupuli/beaker/pull/1758) ([nmburgan](https://github.com/nmburgan))
56
115
 
57
116
  **Closed issues:**
58
117
 
59
118
  - Ruby 3.1/Psych 4 compatibility issues [\#1753](https://github.com/voxpupuli/beaker/issues/1753)
60
119
 
120
+ **Merged pull requests:**
121
+
122
+ - Update net-scp requirement from \>= 1.2, \< 4.0 to \>= 1.2, \< 5.0 [\#1757](https://github.com/voxpupuli/beaker/pull/1757) ([dependabot[bot]](https://github.com/apps/dependabot))
123
+
61
124
  ## [4.38.1](https://github.com/voxpupuli/beaker/tree/4.38.1) (2022-09-21)
62
125
 
63
126
  [Full Changelog](https://github.com/voxpupuli/beaker/compare/4.38.0...4.38.1)
data/Gemfile CHANGED
@@ -26,6 +26,7 @@ if ENV['BEAKER_HYPERVISOR']
26
26
  end
27
27
 
28
28
  group :release do
29
+ gem 'faraday-retry', require: false
29
30
  gem 'github_changelog_generator', require: false
30
31
  end
31
32
 
@@ -59,7 +59,7 @@ end
59
59
  # assert_equal expected, user
60
60
  # end
61
61
  #
62
- # Absorbs any MiniTest::Assertion from a failing test assertion in the block.
62
+ # Absorbs any Minitest::Assertion from a failing test assertion in the block.
63
63
  # This implies that the intermittent failure is caught and the suite will not
64
64
  # go red for this failure. Intended to be used with the Jenkins Build Failure
65
65
  # Analyzer (or similar), to detect these failures without failing the build.
@@ -70,7 +70,7 @@ def fails_intermittently(issue_link, args = {})
70
70
  raise ArgumentError, "a block is required" unless block_given?
71
71
 
72
72
  yield
73
- rescue MiniTest::Assertion, StandardError, SignalException # we have a test failure!
73
+ rescue Minitest::Assertion, StandardError, SignalException # we have a test failure!
74
74
  STDERR.puts "\n\nIntermittent test failure! See: #{issue_link}"
75
75
 
76
76
  if args.empty?
@@ -8,6 +8,7 @@ test_name "dsl::helpers::host_helpers test configuration validation" do
8
8
  "dsl::helpers::host_helpers acceptance tests require at least two hosts"
9
9
 
10
10
  agents = select_hosts(:roles => "agent")
11
+
11
12
  assert (agents.size > 1),
12
13
  "dsl::helpers::host_helpers acceptance tests require at least two hosts with the :agent role"
13
14
 
@@ -15,6 +15,7 @@ test_name 'Hocon Helpers Test' do
15
15
 
16
16
  step '#hocon_file_read : reads doc' do
17
17
  doc = hocon_file_read_on(hosts[0], hocon_filename)
18
+
18
19
  assert(doc.has_value?('setting2'))
19
20
  end
20
21
 
@@ -34,7 +35,7 @@ test_name 'Hocon Helpers Test' do
34
35
  end
35
36
  fail('execution should not continue in failure mode')
36
37
  rescue ArgumentError => e
37
- assert(e.to_s.include?('requires a filename'))
38
+ assert_includes(e.to_s, 'requires a filename')
38
39
  else
39
40
  fail('No exception raised in failure mode')
40
41
  end
@@ -53,7 +54,7 @@ test_name 'Hocon Helpers Test' do
53
54
  hocon_file_edit_on(hosts, hocon_filename)
54
55
  fail('execution should not continue in failure mode')
55
56
  rescue ArgumentError => e
56
- assert(e.to_s.include?('No block was provided'))
57
+ assert_includes(e.to_s, 'No block was provided')
57
58
  else
58
59
  fail('No exception raised in failure mode')
59
60
  end
@@ -71,6 +72,7 @@ test_name 'Hocon Helpers Test' do
71
72
  step '#hocon_file_edit_on : independently read value to verify save' do
72
73
  hocon_file_edit_on(hosts, hocon_filename) do |_host, doc|
73
74
  msg_fail = 'Should have saved "a.b" value inserted in previous step'
75
+
74
76
  assert(doc.has_value?('a.b'), msg_fail)
75
77
  end
76
78
  end
@@ -86,6 +88,7 @@ test_name 'Hocon Helpers Test' do
86
88
  step '#hocon_file_edit_in_place_on : verify save' do
87
89
  hocon_file_edit_on(hosts, hocon_filename) do |_host, doc|
88
90
  msg_fail = 'Should have saved "c.d" value inserted in previous step'
91
+
89
92
  assert(doc.has_value?('c.d'), msg_fail)
90
93
  end
91
94
  end
@@ -15,6 +15,7 @@ test_name "dsl::helpers::host_helpers #archive_file_from" do
15
15
  assert_equal(false, Dir.exist?('archive'))
16
16
  assert_equal(false, Dir.exist?('archive/sut-files'))
17
17
  archive_file_from(default, filepath)
18
+
18
19
  assert_equal(true, Dir.exist?('archive/sut-files'))
19
20
  end
20
21
 
@@ -32,17 +33,20 @@ test_name "dsl::helpers::host_helpers #archive_file_from" do
32
33
  # Create a remote file to archive
33
34
  filepath = default.tmpfile('archive-file-test')
34
35
  create_remote_file(default, filepath, 'number of the beast')
36
+
35
37
  assert_equal(false, Dir.exist?(filepath))
36
38
 
37
39
  # Test that the file is copied locally to <archiveroot>/<hostname>/<filepath>
38
40
  Dir.mktmpdir do |tmpdir|
39
41
  tar_path = File.join(tmpdir, default, filepath + '.tgz')
40
42
  archive_file_from(default, filepath, {}, tmpdir, tar_path)
41
- assert(File.exist?(tar_path))
43
+
44
+ assert_path_exists(tar_path)
42
45
  expected_path = File.join(tmpdir, default)
43
46
 
44
47
  tgz = Zlib::GzipReader.new(File.open(tar_path, 'rb'))
45
48
  Minitar.unpack(tgz, expected_path)
49
+
46
50
  assert_equal('number of the beast', File.read(expected_path + '/' + filepath).strip)
47
51
  end
48
52
  end
@@ -6,6 +6,7 @@ test_name "dsl::helpers::host_helpers #backup_the_file" do
6
6
  remote_source = default.tmpdir
7
7
  remote_destination = default.tmpdir
8
8
  result = backup_the_file default, remote_source, remote_destination
9
+
9
10
  assert_nil result
10
11
  end
11
12
 
@@ -29,6 +30,7 @@ test_name "dsl::helpers::host_helpers #backup_the_file" do
29
30
 
30
31
  assert_equal remote_destination_filename, result
31
32
  remote_contents = on(default, "cat #{remote_destination_filename}").stdout
33
+
32
34
  assert_equal contents, remote_contents
33
35
  end
34
36
 
@@ -43,6 +45,7 @@ test_name "dsl::helpers::host_helpers #backup_the_file" do
43
45
 
44
46
  assert_equal remote_destination_filename, result
45
47
  remote_contents = on(default, "cat #{remote_destination_filename}").stdout
48
+
46
49
  assert_equal contents, remote_contents
47
50
  end
48
51
 
@@ -25,11 +25,13 @@ test_name "dsl::helpers::host_helpers #check_for_package" do
25
25
 
26
26
  step "#check_for_package will return false if the specified package is not installed on the remote host" do
27
27
  result = check_for_package default, "non-existent-package-name"
28
+
28
29
  assert !result
29
30
  end
30
31
 
31
32
  step "#check_for_package will return true if the specified package is installed on the remote host" do
32
33
  result = check_for_package default, known_installed_package
34
+
33
35
  assert result
34
36
  end
35
37
 
@@ -43,11 +45,13 @@ test_name "dsl::helpers::host_helpers #check_for_package" do
43
45
  confine_block :to, :platform => /solaris/ do
44
46
  step "#check_for_package will return false if the specified package is not installed on the remote host" do
45
47
  result = check_for_package default, "non-existent-package-name"
48
+
46
49
  assert !result
47
50
  end
48
51
 
49
52
  step "#check_for_package will return true if the specified package is installed on the remote host" do
50
53
  result = check_for_package default, known_installed_package
54
+
51
55
  assert result
52
56
  end
53
57
 
@@ -69,12 +73,14 @@ test_name "dsl::helpers::host_helpers #check_for_package" do
69
73
  confine_block :except, :platform => /windows|solaris|osx/ do
70
74
  step "#check_for_package will return false if the specified package is not installed on the remote host" do
71
75
  result = check_for_package default, "non-existent-package-name"
76
+
72
77
  assert !result
73
78
  end
74
79
 
75
80
  step "#check_for_package will return true if the specified package is installed on the remote host" do
76
81
  install_package default, known_installed_package
77
82
  result = check_for_package default, known_installed_package
83
+
78
84
  assert result
79
85
  end
80
86
 
@@ -43,6 +43,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
43
43
  create_remote_file_with_backups default, remote_filename, contents
44
44
 
45
45
  remote_contents = on(default, "cat #{remote_filename}").stdout
46
+
46
47
  assert_equal contents, remote_contents
47
48
  end
48
49
 
@@ -54,6 +55,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
54
55
  create_remote_file_with_backups default, remote_filename, contents, { :protocol => "scp" }
55
56
 
56
57
  remote_contents = on(default, "cat #{remote_filename}").stdout
58
+
57
59
  assert_equal contents, remote_contents
58
60
  end
59
61
 
@@ -72,6 +74,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
72
74
 
73
75
  hosts.each do |host|
74
76
  remote_contents = on(host, "cat #{remote_filename}").stdout
77
+
75
78
  assert_equal contents, remote_contents
76
79
  end
77
80
  end
@@ -91,6 +94,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
91
94
 
92
95
  hosts.each do |host|
93
96
  remote_contents = on(host, "cat #{remote_filename}").stdout
97
+
94
98
  assert_equal contents, remote_contents
95
99
  end
96
100
  end
@@ -144,6 +148,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
144
148
  "contents" => contents,
145
149
  "result" => result) do
146
150
  remote_contents = on(default, "cat #{remote_filename}").stdout
151
+
147
152
  assert_equal contents, remote_contents
148
153
  end
149
154
  end
@@ -171,6 +176,7 @@ test_name "dsl::helpers::host_helpers #create_remote_file" do
171
176
  "contents" => contents,
172
177
  "result" => result) do
173
178
  remote_contents = on(host, "cat #{remote_filename}").stdout
179
+
174
180
  assert_equal contents, remote_contents
175
181
  end
176
182
  end
@@ -25,6 +25,7 @@ test_name "dsl::helpers::host_helpers #curl_on" do
25
25
 
26
26
  assert_equal 0, result.exit_code
27
27
  remote_contents = on(default, "cat #{remote_targetfilename}").stdout
28
+
28
29
  assert_equal contents, remote_contents
29
30
  end
30
31
 
@@ -42,6 +43,7 @@ test_name "dsl::helpers::host_helpers #curl_on" do
42
43
 
43
44
  hosts.each do |host|
44
45
  remote_contents = on(host, "cat #{remote_targetfilename}").stdout
46
+
45
47
  assert_equal contents, remote_contents
46
48
  end
47
49
  end