beaker 4.29.1 → 4.30.0

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: d9dde6d3115c1e75993890082fb188bb858ba64d5d62d1f332c1614f0da106d3
4
- data.tar.gz: 2c9f2f21992cfb485756eff3249b3f530894e359fbb183eee840a66091773f4f
3
+ metadata.gz: 0f1cace175ace50c7737ff2962cd6f7bddb7037cb7e9fe8ecc638d4acdc088a7
4
+ data.tar.gz: 81d573163a08a3b7a2d0b63039a2e41202c70fc9c3909247b8f897b2ed84016b
5
5
  SHA512:
6
- metadata.gz: 34066a115a337b515eb8222a659ee4e2adec97cf4ecb4d44593a153e6a1f9189523f76b99d8c5f64a2acbf270f427a1ed108d4d88e6bebc559a4a4d022b183a0
7
- data.tar.gz: a79c9f4c5cf94337a21cb4f31191e031c3748c8fb8232f31df8f1cc65c3d5e279a1855b887e9fdd5cd5f25925e126e1ca3eef858b501202a5dbcaaad0c2a9daa
6
+ metadata.gz: 6a8506c9f3f460f1e64cb35ea4abd992c284b64b3d9f28c914186e8a8c35d59aa30ff0c15f8d7069b8b789c9b69b47c8234045b2eb5aad6cacc53b455dc10ae4
7
+ data.tar.gz: 22edf3d35e3d9c5c38b3eb2dc925e73dd355ceec5e3a60614190fc66f2010776f05dafd0b6d7fff792d17b0c3b8c2e4768d6baba1213457f195c426f9eeebf6f
@@ -7,16 +7,25 @@ on:
7
7
  jobs:
8
8
  release:
9
9
  runs-on: ubuntu-latest
10
- if: github.repository == 'voxpupuli/beaker'
10
+ if: github.repository_owner == 'voxpupuli'
11
11
  steps:
12
12
  - uses: actions/checkout@v2
13
- - name: Install Ruby 2.7
13
+ - name: Install Ruby 3.0
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
- ruby-version: '2.7'
16
+ ruby-version: '3.0'
17
+ env:
18
+ BUNDLE_WITHOUT: release
17
19
  - name: Build gem
18
20
  run: gem build *.gemspec
19
- - name: Publish gem
21
+ - name: Publish gem to rubygems.org
20
22
  run: gem push *.gem
21
23
  env:
22
24
  GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
25
+ - name: Setup GitHub packages access
26
+ run: |
27
+ mkdir -p ~/.gem
28
+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
29
+ chmod 0600 ~/.gem/credentials
30
+ - name: Publish gem to GitHub packages
31
+ run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
@@ -4,19 +4,24 @@ on:
4
4
  - pull_request
5
5
  - push
6
6
 
7
+ env:
8
+ BUNDLE_WITHOUT: release
9
+
7
10
  jobs:
8
11
  test:
9
12
  runs-on: ubuntu-latest
10
13
  strategy:
11
14
  fail-fast: false
12
15
  matrix:
13
- ruby:
14
- - "2.4"
15
- - "2.5"
16
- - "2.6"
17
- - "2.7"
18
- - "3.0"
19
- name: Ruby ${{ matrix.ruby }}
16
+ include:
17
+ - ruby: "2.4"
18
+ - ruby: "2.5"
19
+ - ruby: "2.6"
20
+ - ruby: "2.7"
21
+ - ruby: "3.0"
22
+ coverage: "yes"
23
+ env:
24
+ COVERAGE: ${{ matrix.coverage }}
20
25
  steps:
21
26
  - uses: actions/checkout@v2
22
27
  - name: Install Ruby ${{ matrix.ruby }}
@@ -24,7 +29,5 @@ jobs:
24
29
  with:
25
30
  ruby-version: ${{ matrix.ruby }}
26
31
  bundler-cache: true
27
- - name: Build docs
28
- run: bundle exec rake yard
29
32
  - name: Run tests
30
33
  run: bundle exec rake spec
data/CHANGELOG.md CHANGED
@@ -1,26 +1,22 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [4.30.0](https://github.com/voxpupuli/beaker/compare/4.29.1...4.30.0) (2021-07-21)
4
4
 
5
- The format is based on
6
- [Keep a Changelog](http://keepachangelog.com)
7
- & makes a strong effort to adhere to
8
- [Semantic Versioning](http://semver.org).
5
+ ### Fixed
6
+
7
+ - Fix Platform version string comparison for install_local_package ([#1712](https://github.com/voxpupuli/beaker/pull/1712))
9
8
 
10
- Tracking in this Changelog began for this project in version 3.25.0.
11
- If you're looking for changes from before this, refer to the project's
12
- git logs & PR history.
9
+ ### Added
13
10
 
14
- The headers used in [Keep a Changelog](http://keepachangelog.com) are:
11
+ - Add initial opensuse support ([#1697](https://github.com/voxpupuli/beaker/pull/1697))
12
+ - Implement codecov reporting ([#1710](https://github.com/voxpupuli/beaker/pull/1710))
15
13
 
16
- - Added - for new features.
17
- - Changed - for changes in existing functionality.
18
- - Deprecated - for soon-to-be removed features.
19
- - Removed - for now removed features.
20
- - Fixed - for any bug fixes.
21
- - Security - in case of vulnerabilities.
14
+ ### Changed
22
15
 
23
- # [4.29.1](https://github.com/voxpupuli/beaker/compare/4.29.0...4.29.1) - 25-05-2021
16
+ - beaker-abs: allow latest releases ([#1706](https://github.com/voxpupuli/beaker/pull/1706))
17
+ - Align release setup with other gems ([#1707](https://github.com/voxpupuli/beaker/pull/1707))
18
+
19
+ ## [4.29.1](https://github.com/voxpupuli/beaker/tree/4.29.1) (2021-05-26)
24
20
 
25
21
  ### Fixed
26
22
 
@@ -496,3 +492,6 @@ The headers used in [Keep a Changelog](http://keepachangelog.com) are:
496
492
 
497
493
  # [3.25.0](https://github.com/voxpupuli/beaker/compare/3.24.0...3.25.0) - 2017-09-26
498
494
 
495
+
496
+
497
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source ENV['GEM_SOURCE'] || "https://rubygems.org"
1
+ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -19,3 +19,12 @@ if ENV['BEAKER_PE_PR_REPO_URL']
19
19
  ref = ENV['BEAKER_PE_PR_COMMIT']
20
20
  gem lib, :git => "git@github.com:#{author}/#{lib}.git", :branch => ref
21
21
  end
22
+
23
+ group :release do
24
+ gem 'github_changelog_generator', require: false
25
+ end
26
+
27
+ group :coverage, optional: ENV['COVERAGE']!='yes' do
28
+ gem 'simplecov-console', :require => false
29
+ gem 'codecov', :require => false
30
+ end
data/HISTORY.md ADDED
@@ -0,0 +1,492 @@
1
+ ## [4.30.0](https://github.com/voxpupuli/beaker/compare/4.29.1...4.30.0) (2021-07-21)
2
+
3
+ ### Fixed
4
+
5
+ - Fix Platform version string comparison for install_local_package ([#1712](https://github.com/voxpupuli/beaker/pull/1712))
6
+
7
+ ### Added
8
+
9
+ - Add initial opensuse support ([#1697](https://github.com/voxpupuli/beaker/pull/1697))
10
+ - Implement codecov reporting ([#1710](https://github.com/voxpupuli/beaker/pull/1710))
11
+
12
+ ### Changed
13
+
14
+ - beaker-abs: allow latest releases ([#1706](https://github.com/voxpupuli/beaker/pull/1706))
15
+ - Align release setup with other gems ([#1707](https://github.com/voxpupuli/beaker/pull/1707))
16
+
17
+ ## [4.29.1](https://github.com/voxpupuli/beaker/tree/4.29.1) (2021-05-26)
18
+
19
+ ### Fixed
20
+
21
+ - Fixed `vagrant*` matching in the unix `get_ip()`
22
+
23
+ # [4.29.0](https://github.com/voxpupuli/beaker/compare/4.28.1...4.29.0) - 19-05-2021
24
+
25
+ ### Added
26
+
27
+ - Ruby 3.0 support
28
+
29
+ # [4.28.1](https://github.com/voxpupuli/beaker/compare/4.28.0...4.28.1) - 03-10-2021
30
+
31
+ ### Fixed
32
+
33
+ - Updated the ssh_preference example
34
+ - Fixed various spec tests
35
+ - Updated the `which` command to try `type -P` before falling back to `which`
36
+ for systems that may not have `which` installed
37
+
38
+ # [4.28.0](https://github.com/voxpupuli/beaker/compare/4.27.1...4.28.0) - 12-21-2020
39
+
40
+ ### Changed
41
+
42
+ - Arch Linux: Update box before installing packages ([#1688](https://github.com/voxpupuli/beaker/pull/1688))
43
+ - Move the entire workflow to Github Actions ([#1678](https://github.com/voxpupuli/beaker/pull/1678))
44
+ - Allow fakefs dependency in version >= 1 < 2 ([#1687](https://github.com/voxpupuli/beaker/pull/1687))
45
+
46
+ ### Fixed
47
+
48
+ - Fix License text and SPDX code ([#1681](https://github.com/voxpupuli/beaker/pull/1678))
49
+
50
+ # [4.27.1](https://github.com/voxpupuli/beaker/compare/4.27.0...4.27.1) - 09-29-2020
51
+
52
+ ### Changed
53
+
54
+ - Update net-scp requirement from "~> 1.2" to ">= 1.2, < 4.0"
55
+
56
+ ### Fixed
57
+
58
+ - Handle systems going back in time after reboot
59
+ - Enhanced error handling during the reboot sequence
60
+ - Fixed time check logic during reboot
61
+ - Wrap paths around "" on pswindows
62
+
63
+ # [4.27.0](https://github.com/voxpupuli/beaker/compare/4.26.0...4.27.0) - 07-24-2020
64
+
65
+ ### Changed
66
+
67
+ - Updated dependency versions and minimum Ruby version in gemspec to Ruby 2.4, which is the minimum
68
+ version Beaker will run with.
69
+ - Added Travis unit testing and disabled Jenkins integrations in preparation for transferring the
70
+ repo to Vox Pupuli
71
+
72
+
73
+ # [4.26.0](https://github.com/voxpupuli/beaker/compare/4.25.0...4.26.0)
74
+
75
+ ### Changed
76
+
77
+ - Fixed deprecated SSH option handling for `verify_ssh_key` being passed into Net::SSH. #1655
78
+
79
+ ### Removed
80
+
81
+ - Removed deprecated use of `paranoid` flag with Net::SSH. #1655
82
+
83
+ # [4.25.0](https://github.com/voxpupuli/beaker/compare/4.24.0...4.25.0)
84
+
85
+ ### Added
86
+
87
+ - Execution of Beaker directly through ruby on localhost #1637 ([#1637](https://github.com/voxpupuli/beaker/pull/1637))
88
+
89
+ ### Fixed
90
+
91
+ - Reliability improvements to the `Host#reboot` method ([#1656](https://github.com/voxpupuli/beaker/pull/1656)) ([#1659](https://github.com/voxpupuli/beaker/pull/1659))
92
+
93
+ # [4.24.0](https://github.com/voxpupuli/beaker/compare/4.23.0...4.24.0) - 2020-06-05
94
+
95
+ ### Added
96
+
97
+ - Host method which ([#1651](https://github.com/voxpupuli/beaker/pull/1651))
98
+
99
+ ### Fixed
100
+
101
+ - Fixed implementation for cat and file_exists? host methods for PSWindows ([#1654](https://github.com/voxpupuli/beaker/pull/1654))
102
+ - Fixed implementation for mkdir_p host method for PSWindows ([#1657](https://github.com/voxpupuli/beaker/pull/1657))
103
+
104
+ # [4.23.2](https://github.com/voxpupuli/beaker/compare/4.23.1...4.23.2)
105
+
106
+ ### Fixed
107
+
108
+ - Fixed Beaker's behavior when the `strict_host_key_checking` option is
109
+ provided in the SSH config and Net-SSH > 5 is specified. (#1652)
110
+
111
+ # [4.23.1](https://github.com/voxpupuli/beaker/compare/4.23.0...4.23.1)
112
+
113
+ ### Changed/Removed
114
+
115
+ - Reversed the quoting changes on Unix from #1644 in favor of only quoting on Windows. (#1650)
116
+
117
+ # [4.23.0](https://github.com/voxpupuli/beaker/compare/4.22.1...4.23.0)
118
+
119
+ ### Added
120
+
121
+ - Relaxed dependency on `net-ssh` to `>= 5` to support newer versions. (#1648)
122
+ - `cat` DSL method added. Works on both Unix and Windows hosts. (#1645)
123
+
124
+ ### Changed
125
+
126
+ - The `mkdir_p` and `mv` commands now double quote their file arguments. (#1644) If you rely on file globbing in these methods or elsewhere, please open an issue on the BEAKER project.
127
+ - Change `reboot` method to use `who -b` for uptime detection (#1643)
128
+
129
+ ### Fixed
130
+
131
+ - Use Base64 UTF-16LE encoding for commands (#1626)
132
+ - Fix `tmpdir` method for Powershell on Windows (#1645)
133
+
134
+ # [4.22.1](https://github.com/voxpupuli/beaker/compare/4.22.0...4.22.1)
135
+
136
+ ### Fixed
137
+
138
+ - Removed single quotes around paths for file operation commands on `Host` https://github.com/voxpupuli/beaker/pull/1642
139
+
140
+ # [4.22.0](https://github.com/voxpupuli/beaker/compare/4.21.0...4.22.0) - 2020-05-08
141
+
142
+ ### Added
143
+
144
+ - Host methods chmod and modified_at. ([#1638](https://github.com/voxpupuli/beaker/pull/1638))
145
+
146
+ ### Removed
147
+
148
+ - Support for EL-5. ([#1639](https://github.com/voxpupuli/beaker/pull/1639)) ([#1640](https://github.com/voxpupuli/beaker/pull/1640))
149
+
150
+ # [4.21.0](https://github.com/voxpupuli/beaker/compare/4.20.0...4.21.0) - 2020-03-31
151
+
152
+ ### Added
153
+
154
+ - Empty file `/etc/environment` while preparing ssh environment on Ubuntu 20.04 to keep the current behavior and consider all variables from `~/.ssh/environment`. ([#1635](https://github.com/voxpupuli/beaker/pull/1635))
155
+
156
+ # [4.20.0](https://github.com/voxpupuli/beaker/compare/4.19.0...4.20.0) - 2020-03-19
157
+
158
+ ### Added
159
+
160
+ - Vagrant RSync/SSH settings will now be picked up if set via beaker-vagrant ([#1634](https://github.com/voxpupuli/beaker/pull/1634) and [beaker-vagrant#28](https://github.com/voxpupuli/beaker-vagrant/pull/28))
161
+
162
+ # [4.19.0](https://github.com/voxpupuli/beaker/compare/4.18.0...4.19.0) - 2020-03-13
163
+
164
+ ### Added
165
+
166
+ - `apt-transport-https` package will now be installed on Debian-based systems as part of the prebuilt process. ([#1631](https://github.com/voxpupuli/beaker/pull/1631))
167
+ - Ubuntu 19.10 and 20.04 code name handling. ([#1632](https://github.com/voxpupuli/beaker/pull/1632))
168
+
169
+ ### Changed
170
+
171
+ - The `wait_time`, `max_connection_tries`, and `uptime_retries` parameters have been added to `Host::Unix::Exec.reboot`. This allows for more fine-grained control over how the reboot is handled. ([#1625](https://github.com/voxpupuli/beaker/pull/1625))
172
+
173
+ ### Fixed
174
+
175
+ - In `hosts.yml`, `packaging_platform` will now default to `platform` if unspecified. This fixed a bug where beaker would fail unless you specified both values in your config, even if both values were identical. ([#1628](https://github.com/voxpupuli/beaker/pull/1628))
176
+ - `version_is_less` will now correctly handle builds and RCs when used in version numbers. ([#1630](https://github.com/voxpupuli/beaker/pull/1630))
177
+
178
+ ### Security
179
+ - Update `rake` to `~> 12.0`, which currently resolves to `12.3.3` to remediate [CVE-2020-8130](https://nvd.nist.gov/vuln/detail/CVE-2020-8130)
180
+
181
+ # [4.18.0](https://github.com/voxpupuli/beaker/compare/4.17.0...4.18.0) - 2020-02-26
182
+ ### Changed
183
+ - Thor dependency bumped to >=1.0.1 <2.0
184
+
185
+ # [4.17.0](https://github.com/voxpupuli/beaker/compare/4.16.0...4.17.0) - 2020-02-20
186
+
187
+ ### Added
188
+
189
+ - Windows support in `host_helpers` ([#1622](https://github.com/voxpupuli/beaker/pull/1622))
190
+ - EL 8 support ([#1623](https://github.com/voxpupuli/beaker/pull/1623))
191
+
192
+ # [4.16.0](https://github.com/voxpupuli/beaker/compare/4.15.0...4.16.0) - 2020-02-05
193
+
194
+ ### Added
195
+
196
+ - release section to README ([#1618](https://github.com/voxpupuli/beaker/pull/1618))
197
+ - false return if `link_exists?` raises an error ([#1613](https://github.com/voxpupuli/beaker/pull/1613))
198
+
199
+ ### Fixed
200
+
201
+ - `host.reboot` uses `uptime` rather than `ping` to check host status ([#1619](https://github.com/voxpupuli/beaker/pull/1619))
202
+
203
+ # [4.15.0](https://github.com/voxpupuli/beaker/compare/4.14.1...4.15.0) - 2020-01-30
204
+
205
+ ### Added
206
+
207
+ - macOS 10.15 Catalina support (BKR-1621)
208
+
209
+ # [4.14.1](https://github.com/voxpupuli/beaker/compare/4.14.0...4.14.1) - 2019-11-18
210
+
211
+ ### Fixed
212
+
213
+ - `fips_mode?` detection (#1607)
214
+
215
+ # [4.14.0](https://github.com/voxpupuli/beaker/compare/4.13.1...4.14.0) - 2019-11-12
216
+
217
+ ### Added
218
+
219
+ - Pre-built steps output stacktraces when aborted (QENG-7466)
220
+
221
+ # [4.13.1](https://github.com/voxpupuli/beaker/compare/4.13.0...4.13.1) - 2019-10-07
222
+
223
+ ### Fixed
224
+
225
+ - Use correct platform variant for FIPS repo configs download (BKR-1616)
226
+
227
+ # [4.13.0](https://github.com/voxpupuli/beaker/compare/4.12.0...4.13.0) - 2019-09-16
228
+
229
+ ### Added
230
+
231
+ - Host `enable_remote_rsyslog` method (QENG-7466)
232
+
233
+ # [4.12.0](https://github.com/voxpupuli/beaker/compare/4.11.1...4.12.0) - 2019-08-14
234
+
235
+ ### Added
236
+
237
+ - redhatfips as a recognized platform (PE-27037)
238
+
239
+ # [4.11.1](https://github.com/voxpupuli/beaker/compare/4.11.0...4.11.1) - 2019-08-13
240
+
241
+ ### Changed
242
+
243
+ - `host.down?`'s wait from a fibonacci to a constant wait (BKR-1595)
244
+
245
+ # [4.11.0](https://github.com/voxpupuli/beaker/compare/4.10.0...4.11.0) - 2019-07-22
246
+
247
+ ### Added
248
+
249
+ - FIPS detection host method (BKR-1604)
250
+ - PassTest exception catching for standard reporting
251
+
252
+ # [4.10.0](https://github.com/voxpupuli/beaker/compare/4.9.0...4.10.0) - 2019-07-01
253
+
254
+ ### Added
255
+
256
+ - Down & Up Checking to Host#reboot (BKR-1595)
257
+
258
+ # [4.9.0](https://github.com/voxpupuli/beaker/compare/4.8.0...4.9.0) - 2019-06-19
259
+
260
+ ### Changed
261
+
262
+ - SSH Connection failure backoff shortened (BKR-1599)
263
+
264
+ # [4.8.0](https://github.com/voxpupuli/beaker/compare/4.7.0...4.8.0) - 2019-04-17
265
+
266
+ ### Added
267
+
268
+ - Support for Fedora >= 30 (BKR-1589)
269
+ - Codenames for Ubuntu 18.10, 19.04, and 19.10
270
+
271
+ ### Changed
272
+
273
+ - Remove "repos-pe" prefix for repo filenames
274
+
275
+ # [4.7.0](https://github.com/voxpupuli/beaker/compare/4.6.0...4.7.0) - 2019-04-17
276
+
277
+ ### Added
278
+
279
+ - Provide for OpenSSL 1.1.x+ support
280
+ - enable Solaris10Sparc pkgutil SSL CA2 (IMAGES-844)
281
+
282
+ ### Changed
283
+
284
+ - update pry-byebug dependency 3.4.2->3.6 (BKR-1568)
285
+ - disabling hostkey checks for cisco hosts (QENG-7108)
286
+ - Change behavior of ruby versioning to accept job-parameter RUBY\_VER
287
+ - Change subcommand pre-suite to install ruby 2.3.1
288
+
289
+ # [4.6.0](https://github.com/voxpupuli/beaker/compare/4.5.0...4.6.0) - 2019.03.07
290
+
291
+ ### Added
292
+
293
+ - Codename for Debian 10 'Buster'
294
+
295
+ # [4.5.0](https://github.com/voxpupuli/beaker/compare/4.4.0...4.5.0) - 2019.01.23
296
+
297
+ ### Changed
298
+
299
+ - Do not mirror profile.d on Debian (BKR-1559)
300
+
301
+ # [4.4.0](https://github.com/voxpupuli/beaker/compare/4.3.0...4.4.0) - 2019.01.09
302
+
303
+ ### Added
304
+
305
+ - Return root considerations for appending on nexus devices (BKR-1562)
306
+ - Permit user environment on osx-10.14 (BKR-1534)
307
+ - Add host helpers for working with files (BKR-1560)
308
+
309
+ ### Changed
310
+
311
+ - Replace ntpdate with crony on RHEL-8 (BKR-1555)
312
+
313
+ # [4.3.0](https://github.com/voxpupuli/beaker/compare/4.2.0...4.3.0) - 2018.12.12
314
+
315
+ ### Added
316
+
317
+ - Use zypper to install RPM packages on SLES (PA-2336)
318
+ - Add only-fails capability to beaker (BKR-1523)
319
+
320
+ # [4.2.0](https://github.com/voxpupuli/beaker/compare/4.1.0...4.2.0) - 2018.11.28
321
+
322
+ ### Added
323
+
324
+ - `BEAKER_HYPERVISOR` environment variable to choose the beaker-hostgenerator hypervisor
325
+
326
+ ### Changed
327
+
328
+ - Handling of vsh appended commands for cisco_nexus (BKR-1556)
329
+ - Acceptance tests: Add backoffs to other create_remote_file test
330
+
331
+ ### Fixed
332
+
333
+ - Don't always start a new container with docker (can be reused between invocations of the provision and exec beaker subcommands) (BKR-1547)
334
+ - Recursively remove unpersisted subcommand options (BKR-1549)
335
+
336
+
337
+ # [4.1.0](https://github.com/voxpupuli/beaker/compare/4.0.0...4.1.0) - 2018.10.25
338
+
339
+ ### Added
340
+
341
+ - `--preserve-state` flag will preserve a given host options hash across subcommand runs(BKR-1541)
342
+
343
+ ### Changed
344
+
345
+ - Added additional tests for EL-like systems and added 'redhat' support where necessary
346
+ - Test if puppet module is installed in '/' and avoid stripping of path seperator
347
+
348
+ # [4.0.0](https://github.com/voxpupuli/beaker/compare/3.37.0...4.0.0) - 2018-08-06
349
+
350
+ ### Fixed
351
+
352
+ - `host.rsync_to` throws `Beaker::Host::CommandFailure` if rsync call fails (BKR-463)
353
+ - `host.rsync_to` throws `Beaker::Host::CommandFailure` if rsync does not exist on remote system (BKR-462)
354
+ - `host.rsync_to` now check through configured SSH keys to use the first valid one
355
+ - Updated some `Beaker::Host` methods to always return a `Result` object
356
+
357
+ ### Added
358
+
359
+ - Adds `Beaker::Host#chown`, `#chgrp`, and `#ls_ld` methods (BKR-1499)
360
+ - `#uninstall_package` host helper, to match `#install_package`
361
+ - `Host.uninstall_package` for FreeBSD
362
+ - Now easily check a command's exit status by calling `Result.success?()` for a simple, truthy result. No need to validate the exit code manually.
363
+
364
+ ### Changed
365
+
366
+ - `#set_env` no longer calls `#configure_type_defaults_on`
367
+ - `beaker-puppet` DSL Extension Library has been formally split into a standard DSL Extension Library and removed as a dependency from Beaker. Please see our [upgrade guidelines](docs/how_to/upgrade_from_3_to_4.md).
368
+ - Beaker's Hypervisor Libraries have been removed as dependencies. Please see our [upgrade guidelines](docs/how_to/upgrade_from_3_to_4.md).
369
+
370
+ ### Removed
371
+
372
+ - `PEDefaults` has been moved to `beaker-pe`
373
+
374
+ # [3.37.0](https://github.com/voxpupuli/beaker/compare/3.36.0...3.37.0) - 2018-07-11
375
+
376
+ ### Fixed
377
+
378
+ - Exit early on --help/--version/--parse-only arguments instead of partial dry-run
379
+
380
+ ### Added
381
+
382
+ - `Beaker::Shared::FogCredentials.get_fog_credentials()` to parse .fog credential files
383
+
384
+ ### Changed
385
+
386
+ - `beaker-pe` is no longer automagically included. See [the upgrade guide](/docs/how_to/upgrade_from_3_to_4.md}) for more info
387
+ - `beaker-puppet` is no longer required as a dependency
388
+
389
+ # [3.36.0](https://github.com/voxpupuli/beaker/compare/3.35.0...3.36.0) - 2018-06-18
390
+
391
+ ### Fixed
392
+
393
+ - Raise `ArgumentError` when passing `role = nil` to `only_host_with_role()` or `find_at_most_one_host_with_role()`
394
+ - Use `install_package_with_rpm` in `add_el_extras`
395
+
396
+ ### Added
397
+
398
+ - Installation instructions for contributors
399
+ - Markdown formatting guidelines for `docs/`
400
+ - Glossary for project jargon in [`docs/concepts/glossary.md`](docs/concepts/glossary.md)
401
+ - Use AIX 6.1 packages everywhere for puppet6
402
+
403
+ # [3.35.0](https://github.com/voxpupuli/beaker/compare/3.34.0...3.35.0) - 2018-05-16
404
+
405
+ ### Fixed
406
+
407
+ - Report accurate location of generated smoke test
408
+ - Accept comma-separated tests for exec subcommand
409
+
410
+ ### Added
411
+
412
+ - Added optional ability to use ERB in nodeset YAML files
413
+
414
+ # [3.34.0](https://github.com/voxpupuli/beaker/compare/3.33.0...3.34.0) - 2018-03-26
415
+
416
+ ### Fixed
417
+
418
+ - Recursively glob the tests directory
419
+
420
+ ### Added
421
+
422
+ - Codename for Ubuntu 18.04 'Bionic'
423
+
424
+ # [3.33.0](https://github.com/voxpupuli/beaker/compare/3.32.0...3.33.0) - 2018-03-07
425
+
426
+ ### Changed
427
+
428
+ - Use relative paths for beaker exec
429
+
430
+ # [3.32.0](https://github.com/voxpupuli/beaker/compare/3.31.0...3.32.0) - 2018-02-22
431
+
432
+ ### Changed
433
+
434
+ - Fully qualify sles ssh restart cmd
435
+ - Deprecated deploy_package_repo methods
436
+ - Configuration of host type in host_prebuilt_steps
437
+
438
+ ### Added
439
+
440
+ - Added missing beaker options for subcommand passthorugh
441
+
442
+ # [3.31.0](https://github.com/voxpupuli/beaker/compare/3.30.0...3.31.0) - 2018-01-22
443
+
444
+ ### Changed
445
+
446
+ - Clean up ssh paranoid setting deprecation warnings
447
+
448
+ ### Added
449
+
450
+ - Add macOS 10.13 support
451
+
452
+ # [3.30.0](https://github.com/voxpupuli/beaker/compare/3.29.0...3.30.0) - 2018-01-10
453
+
454
+ ### Changed
455
+
456
+ - Use `host.hostname` when combining options host_hash with host instance options
457
+
458
+ ### Removed
459
+
460
+ - `amazon` as a platform value
461
+
462
+ ### Added
463
+
464
+ - Load project options from .beaker.yml
465
+
466
+ # [3.29.0](https://github.com/voxpupuli/beaker/compare/3.28.0...3.29.0) - 2017-11-16
467
+
468
+ ### Added
469
+
470
+ - Adding default to read fog credentials
471
+
472
+ # [3.28.0](https://github.com/voxpupuli/beaker/compare/3.27.0...3.28.0) - 2017-11-01
473
+
474
+ ### Fixed
475
+
476
+ - corruption of `opts[:ignore]` when using `rsync`
477
+
478
+ # [3.27.0](https://github.com/voxpupuli/beaker/compare/3.26.0...3.27.0) - 2017-10-19
479
+
480
+ ### Added
481
+
482
+ - support amazon as a platform
483
+ - add codenames for MacOS 10.13 and Ubuntu Artful
484
+
485
+ # [3.26.0](https://github.com/voxpupuli/beaker/compare/3.25.0...3.26.0) - 2017-10-05
486
+
487
+ ### Added
488
+
489
+ - concept of `manual_test` and `manual_step`
490
+
491
+ # [3.25.0](https://github.com/voxpupuli/beaker/compare/3.24.0...3.25.0) - 2017-09-26
492
+
data/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Beaker
2
2
 
3
+ [![License](https://img.shields.io/github/license/voxpupuli/beaker.svg)](https://github.com/voxpupuli/beaker/blob/master/LICENSE)
4
+ [![Test](https://github.com/voxpupuli/beaker/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker/actions/workflows/test.yml)
5
+ [![codecov](https://codecov.io/gh/voxpupuli/beaker/branch/master/graph/badge.svg?token=Mypkl78hvK)](https://codecov.io/gh/voxpupuli/beaker)
6
+ [![Release](https://github.com/voxpupuli/beaker/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker/actions/workflows/release.yml)
7
+ [![RubyGem Version](https://img.shields.io/gem/v/beaker.svg)](https://rubygems.org/gems/beaker)
8
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/beaker.svg)](https://rubygems.org/gems/beaker)
9
+ [![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice)
10
+
3
11
  Beaker is a test harness focused on acceptance testing via interactions between multiple (virtual) machines. It provides platform abstraction between different Systems Under Test (SUTs), and it can also be used as a virtual machine provisioner - setting up machines, running any commands on those machines, and then exiting.
4
12
 
5
13
  Beaker runs tests written in Ruby, and provides additional Domain-Specific Language (DSL) methods. This gives you access to all standard Ruby along with acceptance testing specific commands.
@@ -24,10 +32,6 @@ Documentation for Beaker can be found in this repository in
24
32
 
25
33
  Beaker functionality has been extended through the use of libraries available as gems. See the [complete list](docs/concepts/beaker_libraries.md) for available gems. See the [beaker-template documentation](https://github.com/puppetlabs/beaker-template/blob/master/README.md) for documentation on creating beaker-libraries.
26
34
 
27
- # License
28
-
29
- See [LICENSE](LICENSE) file.
30
-
31
35
  # Support & Issues
32
36
 
33
37
  Please log tickets and issues at our [Beaker Issue Tracker](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR). In addition there is an active #puppet-dev channel on Freenode.
@@ -42,11 +46,24 @@ If you'd like to contribute improvements to Beaker, please see [CONTRIBUTING](CO
42
46
 
43
47
  For information on project maintainers, please check out our [CODEOWNERS doc](CODEOWNERS).
44
48
 
45
- # Releasing
49
+ ## Transfer Notice
50
+
51
+ This plugin was originally authored by [Puppet Inc](http://puppet.com).
52
+ The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.
53
+ Existing pull requests and issues were transferred over, please fork and continue to contribute here.
54
+
55
+ Previously: https://github.com/puppetlabs/beaker
56
+
57
+ ## License
46
58
 
47
- Since the beaker project has always been the central hub for all beaker testing, its release process has been more involved than most beaker-libraries (ie. [beaker-puppet](https://github.com/puppetlabs/beaker-puppet)).
48
- Historically, the process has been described in [Confluence: Beaker Release Process](https://confluence.puppetlabs.com/display/SRE/Beaker+Release+Process) (apologies, most links in this section are Puppet-internal).
59
+ This gem is licensed under the Apache-2 license.
49
60
 
50
- To release new versions of beaker, please use this [jenkins job](https://jenkins-sre.delivery.puppetlabs.net/view/all/job/qe_beaker-gem_init-multijob_master/). This job lives on internal infrastructure.
61
+ ## Release information
51
62
 
52
- To run the job, click on `Build with Parameters` in the menu on the left. Make sure you verify the checkbox next to `PUBLIC` is checked and enter the appropriate version. The version should adhere to semantic version standards. When in doubt, consult [the maintainers of Beaker](#maintainers) for guidance.
63
+ To make a new release, please do:
64
+ * update the version in the gemspec file
65
+ * Install gems with `bundle install --with release --path .vendor`
66
+ * generate the changelog with `bundle exec rake changelog`
67
+ * Check if the new version matches the closed issues/PRs in the changelog
68
+ * Create a PR with it
69
+ * After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages
data/Rakefile CHANGED
@@ -328,3 +328,17 @@ namespace :docs do
328
328
  end
329
329
  end
330
330
  end
331
+
332
+ begin
333
+ require 'rubygems'
334
+ require 'github_changelog_generator/task'
335
+
336
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
337
+ config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
338
+ config.user = 'voxpupuli'
339
+ config.project = 'beaker'
340
+ gem_version = Gem::Specification.load("#{config.project}.gemspec").version
341
+ config.future_release = gem_version
342
+ end
343
+ rescue LoadError
344
+ end
@@ -97,7 +97,7 @@ test_name "dsl::helpers::host_helpers #deploy_package_repo" do
97
97
  end
98
98
  end
99
99
 
100
- confine_block :to, :platform => /sles/i do
100
+ confine_block :to, :platform => /opensuse|sles/i do
101
101
 
102
102
  step "#deploy_package_repo updates zypper repository list on the remote host" do
103
103
  Dir.mktmpdir do |local_dir|
@@ -119,7 +119,7 @@ test_name "dsl::helpers::host_helpers #deploy_package_repo" do
119
119
  end
120
120
  end
121
121
 
122
- confine_block :except, :platform => /el-\d|fedora|centos|eos|ubuntu|debian|cumulus|sles/i do
122
+ confine_block :except, :platform => /el-\d|fedora|centos|eos|ubuntu|debian|cumulus|opensuse|sles/i do
123
123
 
124
124
  # OS X, windows (cygwin, powershell), solaris, etc.
125
125
 
@@ -5,7 +5,7 @@ def get_host_pkg(host)
5
5
  case
6
6
  when host['platform'] =~ /sles-10/
7
7
  Beaker::HostPrebuiltSteps::SLES10_PACKAGES
8
- when host['platform'] =~ /sles-/
8
+ when host['platform'] =~ /opensuse|sles-/
9
9
  Beaker::HostPrebuiltSteps::SLES_PACKAGES
10
10
  when host['platform'] =~ /debian/
11
11
  Beaker::HostPrebuiltSteps::DEBIAN_PACKAGES
@@ -53,7 +53,7 @@ hosts.each do |host|
53
53
  next if host['platform'] =~ /windows/
54
54
  package = 'zsh'
55
55
  package = 'CSWzsh' if host['platform'] =~ /solaris-10/
56
- package = 'git' if host['platform'] =~ /sles/
56
+ package = 'git' if host['platform'] =~ /opensuse|sles/
57
57
 
58
58
  if host['platform'] =~ /solaris-11/
59
59
  logger.debug("#{package} should be uninstalled on #{host}")
data/beaker.gemspec CHANGED
@@ -24,13 +24,12 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency 'rspec', '~> 3.0'
25
25
  s.add_development_dependency 'rspec-its'
26
26
  s.add_development_dependency 'fakefs', '~> 1.0'
27
- s.add_development_dependency 'simplecov'
28
27
  s.add_development_dependency 'rake', '~> 13.0'
29
28
 
30
29
  # Provisioner dependencies - needed for acceptance tests
31
30
  # TODO: figure out how to remove these
32
31
  s.add_development_dependency 'beaker-aws', '~> 0.1'
33
- s.add_development_dependency 'beaker-abs', '~> 0.4'
32
+ s.add_development_dependency 'beaker-abs', '>= 0.4'
34
33
  s.add_development_dependency 'beaker-vmpooler', '~> 1.0'
35
34
 
36
35
  # Documentation dependencies
@@ -70,6 +70,7 @@ The platform's format is `/^OSFAMILY-VERSION-ARCH.*$/` where `OSFAMILY` is one o
70
70
  * oracle
71
71
  * scientific
72
72
  * sles
73
+ * opensuse
73
74
  * ubuntu
74
75
  * windows
75
76
  * solaris
@@ -188,8 +188,8 @@ module Unix::Exec
188
188
  # This is for sles based hosts.
189
189
  # @param [String] env_file The ssh environment file to read from
190
190
  def mirror_env_to_profile_d env_file
191
- if self[:platform] =~ /sles-/
192
- @logger.debug("mirroring environment to /etc/profile.d on sles platform host")
191
+ if self[:platform] =~ /opensuse|sles-/
192
+ @logger.debug("mirroring environment to /etc/profile.d on opensuse/sles platform host")
193
193
  cur_env = exec(Beaker::Command.new("cat #{env_file}")).stdout
194
194
  shell_env = ''
195
195
  cur_env.each_line do |env_line|
@@ -284,7 +284,7 @@ module Unix::Exec
284
284
  exec(Beaker::Command.new("systemctl restart sshd.service"))
285
285
  when /el-|centos|fedora|redhat|oracle|scientific|eos/
286
286
  exec(Beaker::Command.new("/sbin/service sshd restart"))
287
- when /sles/
287
+ when /opensuse|sles/
288
288
  exec(Beaker::Command.new("/usr/sbin/rcsshd restart"))
289
289
  when /solaris/
290
290
  exec(Beaker::Command.new("svcadm restart svc:/network/ssh:default"))
@@ -315,7 +315,7 @@ module Unix::Exec
315
315
  directory = tmpdir()
316
316
  exec(Beaker::Command.new("echo 'PermitUserEnvironment yes' | cat - /etc/ssh/sshd_config > #{directory}/sshd_config.permit"))
317
317
  exec(Beaker::Command.new("mv #{directory}/sshd_config.permit /etc/ssh/sshd_config"))
318
- when /sles/
318
+ when /opensuse|sles/
319
319
  directory = tmpdir()
320
320
  exec(Beaker::Command.new("echo 'PermitUserEnvironment yes' | cat - /etc/ssh/sshd_config > #{directory}/sshd_config.permit"))
321
321
  exec(Beaker::Command.new("mv #{directory}/sshd_config.permit /etc/ssh/sshd_config"))
@@ -90,7 +90,7 @@ module Unix::File
90
90
  case self['platform']
91
91
  when /fedora|el-|redhat|centos/
92
92
  '/etc/yum.repos.d/'
93
- when /sles/
93
+ when /opensuse|sles/
94
94
  '/etc/zypp/repos.d/'
95
95
  when /debian|ubuntu|cumulus|huaweios/
96
96
  '/etc/apt/sources.list.d'
@@ -113,7 +113,7 @@ module Unix::File
113
113
  repo_filename = "pl-%s-%s-" % [ package_name, build_version ]
114
114
 
115
115
  case variant
116
- when /fedora|el|redhat|centos|cisco_nexus|cisco_ios_xr|sles/
116
+ when /fedora|el|redhat|centos|cisco_nexus|cisco_ios_xr|opensuse|sles/
117
117
  variant = 'el' if ['centos', 'redhat'].include?(variant)
118
118
 
119
119
  variant = 'redhatfips' if self['packaging_platform'] =~ /redhatfips/
@@ -154,7 +154,7 @@ module Unix::File
154
154
  # @return [String] Type of repo (rpm|deb)
155
155
  def repo_type
156
156
  case self['platform']
157
- when /fedora|el-|redhat|centos|sles/
157
+ when /fedora|el-|redhat|centos|opensuse|sles/
158
158
  'rpm'
159
159
  when /debian|ubuntu|cumulus|huaweios/
160
160
  'deb'
@@ -28,7 +28,7 @@ module Unix::Pkg
28
28
  when /sles-10/
29
29
  result = execute("zypper se -i --match-exact #{name}", opts) { |result| result }
30
30
  result.stdout =~ /No packages found/ ? (return false) : (return result.exit_code == 0)
31
- when /sles-/
31
+ when /opensuse|sles-/
32
32
  if !self[:sles_rpmkeys_nightly_pl_imported]
33
33
  # The `:sles_rpmkeys_nightly_pl_imported` key is only read here at this
34
34
  # time. It's just to make sure that we only do the key import once, &
@@ -85,7 +85,7 @@ module Unix::Pkg
85
85
 
86
86
  def install_package(name, cmdline_args = '', version = nil, opts = {})
87
87
  case self['platform']
88
- when /sles-/
88
+ when /opensuse|sles-/
89
89
  execute("zypper --non-interactive --gpg-auto-import-keys in #{name}", opts)
90
90
  when /el-4/
91
91
  @logger.debug("Package installation not supported on rhel4")
@@ -177,7 +177,7 @@ module Unix::Pkg
177
177
 
178
178
  def uninstall_package(name, cmdline_args = '', opts = {})
179
179
  case self['platform']
180
- when /sles-/
180
+ when /opensuse|sles-/
181
181
  execute("zypper --non-interactive rm #{name}", opts)
182
182
  when /el-4/
183
183
  @logger.debug("Package uninstallation not supported on rhel4")
@@ -207,7 +207,7 @@ module Unix::Pkg
207
207
  # the package manager
208
208
  def upgrade_package(name, cmdline_args = '', opts = {})
209
209
  case self['platform']
210
- when /sles-/
210
+ when /opensuse|sles-/
211
211
  execute("zypper --non-interactive --no-gpg-checks up #{name}", opts)
212
212
  when /el-4/
213
213
  @logger.debug("Package upgrade is not supported on rhel4")
@@ -302,7 +302,7 @@ module Unix::Pkg
302
302
  deploy_yum_repo(path, name, version)
303
303
  when /ubuntu|debian|cumulus|huaweios/
304
304
  deploy_apt_repo(path, name, version)
305
- when /sles/
305
+ when /opensuse|sles/
306
306
  deploy_zyp_repo(path, name, version)
307
307
  else
308
308
  # solaris, windows
@@ -424,12 +424,15 @@ module Unix::Pkg
424
424
  raise ArgumentError, error_message % "puppet_agent_version" unless puppet_agent_version
425
425
 
426
426
  variant, version, arch, codename = self['platform'].to_array
427
+
427
428
  case variant
428
429
  when /^(solaris)$/
429
430
  release_path_end, release_file = solaris_puppet_agent_dev_package_info(
430
431
  puppet_collection, puppet_agent_version, opts )
431
- when /^(sles|aix|el|centos|oracle|redhat|scientific)$/
432
+ when /^(opensuse|sles|aix|el|centos|oracle|redhat|scientific)$/
432
433
  variant = 'el' if variant.match(/(?:el|centos|oracle|redhat|scientific)/)
434
+ variant = 'sles' if variant == 'opensuse'
435
+
433
436
  if variant == 'aix'
434
437
  arch = 'ppc' if arch == 'power'
435
438
  version_x, version_y = /^(\d+)\.(\d+)/.match(puppet_agent_version).captures.map(&:to_i)
@@ -464,7 +467,7 @@ module Unix::Pkg
464
467
 
465
468
  variant, version, arch, codename = self['platform'].to_array
466
469
  case variant
467
- when /^(fedora|el|centos|redhat|sles)$/
470
+ when /^(fedora|el|centos|redhat|opensuse|sles)$/
468
471
  variant = ((['centos', 'redhat'].include?(variant)) ? 'el' : variant)
469
472
  release_file = "/repos/#{variant}/#{version}/#{puppet_collection}/#{arch}/puppet-agent-*.rpm"
470
473
  download_file = "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
@@ -524,9 +527,9 @@ module Unix::Pkg
524
527
  case variant
525
528
  when /^(fedora|el|redhat|centos)$/
526
529
  command_name = 'yum'
527
- command_name = 'dnf' if variant == 'fedora' && version > 21
530
+ command_name = 'dnf' if variant == 'fedora' && version.to_i > 21
528
531
  execute("#{command_name} --nogpgcheck localinstall -y #{onhost_package_file}")
529
- when /^(sles)$/
532
+ when /^(opensuse|sles)$/
530
533
  execute("zypper --non-interactive --no-gpg-checks in #{onhost_package_file}")
531
534
  when /^(debian|ubuntu|cumulus)$/
532
535
  execute("dpkg -i --force-all #{onhost_package_file}")
@@ -552,7 +555,7 @@ module Unix::Pkg
552
555
  def uncompress_local_tarball(onhost_tar_file, onhost_base_dir, download_file)
553
556
  variant, version, arch, codename = self['platform'].to_array
554
557
  case variant
555
- when /^(fedora|el|centos|redhat|sles|debian|ubuntu|cumulus)$/
558
+ when /^(fedora|el|centos|redhat|opensuse|sles|debian|ubuntu|cumulus)$/
556
559
  execute("tar -zxvf #{onhost_tar_file} -C #{onhost_base_dir}")
557
560
  when /^solaris$/
558
561
  # uncompress PE puppet-agent tarball
@@ -55,7 +55,7 @@ module Beaker
55
55
  case
56
56
  when host['platform'] =~ /el-8|fedora/
57
57
  ntp_command = "chronyc add server #{ntp_server} prefer trust;chronyc makestep;chronyc burst 1/2"
58
- when host['platform'] =~ /sles-/
58
+ when host['platform'] =~ /opensuse-|sles-/
59
59
  ntp_command = "sntp #{ntp_server}"
60
60
  when host['platform'] =~ /cisco_nexus/
61
61
  ntp_server = host.exec(Command.new("getent hosts #{NTPSERVER} | head -n1 |cut -d \" \" -f1"), :acceptable_exit_codes => [0]).stdout
@@ -106,7 +106,7 @@ module Beaker
106
106
  check_and_install_packages_if_needed(host, RHEL8_PACKAGES)
107
107
  when host['platform'] =~ /sles-10/
108
108
  check_and_install_packages_if_needed(host, SLES10_PACKAGES)
109
- when host['platform'] =~ /sles-/
109
+ when host['platform'] =~ /opensuse|sles-/
110
110
  check_and_install_packages_if_needed(host, SLES_PACKAGES)
111
111
  when host['platform'] =~ /debian/
112
112
  check_and_install_packages_if_needed(host, DEBIAN_PACKAGES)
@@ -129,7 +129,7 @@ module Beaker
129
129
  check_and_install_packages_if_needed(host, ARCHLINUX_PACKAGES)
130
130
  when host['platform'] =~ /fedora/
131
131
  check_and_install_packages_if_needed(host, FEDORA_PACKAGES)
132
- when host['platform'] !~ /debian|aix|solaris|windows|sles-|osx-|cumulus|f5-|netscaler|cisco_/
132
+ when host['platform'] !~ /debian|aix|solaris|windows|opensuse-|sles-|osx-|cumulus|f5-|netscaler|cisco_/
133
133
  check_and_install_packages_if_needed(host, UNIX_PACKAGES)
134
134
  end
135
135
  end
data/lib/beaker/perf.rb CHANGED
@@ -4,7 +4,7 @@ module Beaker
4
4
 
5
5
  PERF_PACKAGES = ['sysstat']
6
6
  # SLES does not treat sysstat as a service that can be started
7
- PERF_SUPPORTED_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus|sles/
7
+ PERF_SUPPORTED_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus|opensuse|sles/
8
8
  PERF_START_PLATFORMS = /debian|ubuntu|redhat|centos|oracle|scientific|fedora|el|eos|cumulus/
9
9
 
10
10
  # Create the Perf instance and runs setup_perf_on_host on all hosts if --collect-perf-data
@@ -42,7 +42,7 @@ module Beaker
42
42
  if host['platform'] =~ /debian|ubuntu|cumulus/
43
43
  @logger.perf_output("Modify /etc/default/sysstat on Debian and Ubuntu platforms")
44
44
  host.exec(Command.new('sed -i s/ENABLED=\"false\"/ENABLED=\"true\"/ /etc/default/sysstat'))
45
- elsif host['platform'] =~ /sles/
45
+ elsif host['platform'] =~ /opensuse|sles/
46
46
  @logger.perf_output("Creating symlink from /etc/sysstat/sysstat.cron to /etc/cron.d")
47
47
  host.exec(Command.new('ln -s /etc/sysstat/sysstat.cron /etc/cron.d'),:acceptable_exit_codes => [0,1])
48
48
  end
@@ -3,7 +3,7 @@ module Beaker
3
3
  # all String methods while adding several platform-specific use cases.
4
4
  class Platform < String
5
5
  # Supported platforms
6
- PLATFORMS = /^(alpine|huaweios|cisco_nexus|cisco_ios_xr|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|sles|ubuntu|windows|solaris|aix|archlinux|el|eos|cumulus|f5|netscaler)\-.+\-.+$/
6
+ PLATFORMS = /^(alpine|huaweios|cisco_nexus|cisco_ios_xr|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|opensuse|sles|ubuntu|windows|solaris|aix|archlinux|el|eos|cumulus|f5|netscaler)\-.+\-.+$/
7
7
  # Platform version numbers vs. codenames conversion hash
8
8
  PLATFORM_VERSION_CODES =
9
9
  { :debian => { "bullseye" => "11",
@@ -69,6 +69,7 @@ module Beaker
69
69
  # * redhat
70
70
  # * redhatfips
71
71
  # * scientific
72
+ # * opensuse
72
73
  # * sles
73
74
  # * ubuntu
74
75
  # * windows
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '4.29.1'
3
+ STRING = '4.30.0'
4
4
  end
5
5
  end
@@ -76,6 +76,11 @@ module Beaker
76
76
  expect( instance.package_config_dir ).to be === '/etc/zypp/repos.d/'
77
77
  end
78
78
 
79
+ it 'returns correctly for opensuse-based platforms' do
80
+ @platform = 'opensuse-15-x86_64'
81
+ expect( instance.package_config_dir ).to be === '/etc/zypp/repos.d/'
82
+ end
83
+
79
84
  it 'errors for all other platform types' do
80
85
  @platform = 'eos-4-x86_64'
81
86
  expect {
@@ -102,6 +107,13 @@ module Beaker
102
107
  expect( filename ).to match( /sion7\-sles\-/ )
103
108
  end
104
109
 
110
+ it 'sets the opensuse portion correctly for opensuse platforms' do
111
+ @platform = 'opensuse-15-x86_64'
112
+ allow( instance ).to receive( :is_pe? ) { false }
113
+ filename = instance.repo_filename( 'pkg_name', 'pkg_version7' )
114
+ expect( filename ).to match( /sion7\-opensuse\-/ )
115
+ end
116
+
105
117
  it 'builds the filename correctly for el-based platforms' do
106
118
  @platform = 'el-21-x86_64'
107
119
  allow( instance ).to receive( :is_pe? ) { false }
@@ -73,6 +73,13 @@ module Beaker
73
73
  instance.deploy_package_repo(path,name,version)
74
74
  end
75
75
 
76
+ it 'calls #deploy_zyp_repo for opensuse systems' do
77
+ @opts = {'platform' => 'opensuse-is-me'}
78
+ expect(instance).to receive(:deploy_zyp_repo)
79
+ allow(File).to receive(:exists?).with(path).and_return(true)
80
+ instance.deploy_package_repo(path,name,version)
81
+ end
82
+
76
83
  it 'raises an error for unsupported systems' do
77
84
  @opts = {'platform' => 'windows-is-me'}
78
85
  allow(File).to receive(:exists?).with(path).and_return(true)
@@ -102,6 +109,14 @@ module Beaker
102
109
  expect( instance ).to receive(:exec).with('', :accept_all_exit_codes => true).and_return(generate_result("hello", {:exit_code => 0})).exactly(2).times
103
110
  expect( instance.check_for_package(pkg) ).to be === true
104
111
  end
112
+ it "checks correctly on opensuse" do
113
+ @opts = {'platform' => 'opensuse-is-me'}
114
+ pkg = 'sles_package'
115
+ expect( Beaker::Command ).to receive( :new ).with( /^rpmkeys.*nightlies.puppetlabs.com.*/, anything, anything ).and_return('').ordered.once
116
+ expect( Beaker::Command ).to receive(:new).with("zypper --gpg-auto-import-keys se -i --match-exact #{pkg}", [], {:prepend_cmds=>nil, :cmdexe=>false}).and_return('').ordered.once
117
+ expect( instance ).to receive(:exec).with('', :accept_all_exit_codes => true).and_return(generate_result("hello", {:exit_code => 0})).exactly(2).times
118
+ expect( instance.check_for_package(pkg) ).to be === true
119
+ end
105
120
 
106
121
  it "checks correctly on fedora" do
107
122
  @opts = {'platform' => 'fedora-is-me'}
@@ -297,6 +312,7 @@ module Beaker
297
312
  platforms = { 'solaris-10-x86_64' => ["solaris/10/#{puppet_collection}", "puppet-agent-#{puppet_agent_version}-1.i386.pkg.gz"],
298
313
  'solaris-11-x86_64' => ["solaris/11/#{puppet_collection}", "puppet-agent@#{puppet_agent_version},5.11-1.i386.p5p"],
299
314
  'sles-11-x86_64' => ["sles/11/#{puppet_collection}/x86_64", "puppet-agent-#{puppet_agent_version}-1.sles11.x86_64.rpm"],
315
+ 'opensuse-15-x86_64' => ["sles/15/#{puppet_collection}/x86_64", "puppet-agent-#{puppet_agent_version}-1.sles15.x86_64.rpm"],
300
316
  'aix-6.1-power' => ["aix/6.1/#{puppet_collection}/ppc", "puppet-agent-#{puppet_agent_version}-1.aix6.1.ppc.rpm"],
301
317
  'el-7-x86_64' => ["el/7/#{puppet_collection}/x86_64", "puppet-agent-#{puppet_agent_version}-1.el7.x86_64.rpm"],
302
318
  'centos-7-x86_64' => ["el/7/#{puppet_collection}/x86_64", "puppet-agent-#{puppet_agent_version}-1.el7.x86_64.rpm"],
@@ -509,14 +525,9 @@ module Beaker
509
525
  describe '#install_local_package' do
510
526
  let( :platform ) { @platform || 'fedora' }
511
527
  let( :version ) { @version || 6 }
512
- let( :platform_mock ) {
513
- mock = Object.new
514
- allow( mock ).to receive( :to_array ) { [platform, version, '', ''] }
515
- mock
516
- }
517
528
 
518
529
  before :each do
519
- allow( instance ).to receive( :[] ).with( 'platform' ) { platform_mock }
530
+ allow( instance ).to receive( :[] ).with( 'platform' ) { Beaker::Platform.new("#{platform}-#{version}-x86_64") }
520
531
  end
521
532
 
522
533
  it 'Fedora 22-39: uses dnf' do
@@ -530,7 +541,6 @@ module Beaker
530
541
 
531
542
  it 'Fedora 21 uses yum' do
532
543
  package_file = 'testing_456.yay'
533
- platform_mock = Object.new
534
544
  [21].each do |version|
535
545
  @version = version
536
546
  expect( instance ).to receive( :execute ).with( /^yum.*#{package_file}$/ )
@@ -578,18 +588,13 @@ module Beaker
578
588
  let( :tar_file ) { 'test.tar.gz' }
579
589
  let( :base_dir ) { '/base/dir/fake' }
580
590
  let( :download_file ) { 'download_file.txt' }
581
- let( :platform_mock ) {
582
- mock = Object.new
583
- allow( mock ).to receive( :to_array ) { [platform, version, '', ''] }
584
- mock
585
- }
586
591
 
587
592
  before :each do
588
- allow( instance ).to receive( :[] ).with( 'platform' ) { platform_mock }
593
+ allow( instance ).to receive( :[] ).with( 'platform' ) { Beaker::Platform.new("#{platform}-#{version}-x86_64") }
589
594
  end
590
595
 
591
596
  it 'rejects unsupported platforms' do
592
- @platform = 'huawei'
597
+ @platform = 'cisco_nexus'
593
598
  expect {
594
599
  instance.uncompress_local_tarball( tar_file, base_dir, download_file )
595
600
  }.to raise_error(
@@ -605,6 +610,14 @@ module Beaker
605
610
  instance.uncompress_local_tarball( tar_file, base_dir, download_file )
606
611
  end
607
612
 
613
+ it 'untars the file given' do
614
+ @platform = 'opensuse'
615
+ expect( instance ).to receive( :execute ).with(
616
+ /^tar .* #{tar_file} .* #{base_dir}$/
617
+ )
618
+ instance.uncompress_local_tarball( tar_file, base_dir, download_file )
619
+ end
620
+
608
621
  context 'on solaris' do
609
622
 
610
623
  before :each do
@@ -170,6 +170,14 @@ module Unix
170
170
  expect( release_file ).to be === "puppet-agent-pa_version1-1.sles12.arch.rpm"
171
171
  end
172
172
 
173
+ it 'sets up opensuse platforms correctly' do
174
+ @platform = 'opensuse-15-x86_64'
175
+ release_path_end, release_file = host.puppet_agent_dev_package_info(
176
+ 'pa_collection', 'pa_version1' )
177
+ expect( release_path_end ).to be === "sles/15/pa_collection/x86_64"
178
+ expect( release_file ).to be === "puppet-agent-pa_version1-1.sles15.x86_64.rpm"
179
+ end
180
+
173
181
  it 'sets the arch correctly on aix-power platforms' do
174
182
  @platform = 'aix-6.1-power'
175
183
  release_path_end, release_file = host.puppet_agent_dev_package_info(
@@ -234,4 +242,4 @@ module Unix
234
242
  end
235
243
  end
236
244
  end
237
- end
245
+ end
@@ -447,6 +447,21 @@ describe Beaker do
447
447
 
448
448
  end
449
449
 
450
+ it "can validate opensuse hosts" do
451
+ @platform = 'opensuse-15-x86_x64'
452
+
453
+ hosts.each do |host|
454
+ sles_only_pkgs.each do |pkg|
455
+ expect( host ).to receive( :check_for_package).with( pkg ).once.and_return( false )
456
+ expect( host ).to receive( :install_package ).with( pkg ).once
457
+ end
458
+
459
+ end
460
+
461
+ subject.validate_host(hosts, options)
462
+
463
+ end
464
+
450
465
  it "can validate RHEL8 hosts" do
451
466
  @platform = 'el-8-x86_x64'
452
467
 
@@ -44,9 +44,10 @@ module Beaker
44
44
  end
45
45
 
46
46
  it 'creates a new Perf object with multiple hosts, :collect_perf_data = true, SLES' do
47
- hosts = [ make_host("myHost", @options), make_host("myOtherHost", @options) ]
47
+ hosts = [ make_host("myHost", @options), make_host("myOtherHost", @options), make_host("myThirdHost", @options) ]
48
48
  hosts[0]['platform'] = "centos-6-x86_64"
49
49
  hosts[1]['platform'] = "sles-11-x86_64"
50
+ hosts[2]['platform'] = "opensuse-15-x86_64"
50
51
  @my_logger.remove_destination(STDOUT)
51
52
  perf = Perf.new( hosts, @options )
52
53
  expect( perf ).to be_a_kind_of Perf
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,27 @@
1
- require 'simplecov'
1
+ begin
2
+ require 'simplecov'
3
+ require 'simplecov-console'
4
+ require 'codecov'
5
+ rescue LoadError
6
+ else
7
+ SimpleCov.start do
8
+ track_files 'lib/**/*.rb'
9
+
10
+ add_filter '/spec'
11
+
12
+ enable_coverage :branch
13
+
14
+ # do not track vendored files
15
+ add_filter '/vendor'
16
+ add_filter '/.vendor'
17
+ end
18
+
19
+ SimpleCov.formatters = [
20
+ SimpleCov::Formatter::Console,
21
+ SimpleCov::Formatter::Codecov,
22
+ ]
23
+ end
24
+
2
25
  require 'beaker'
3
26
  require 'fakefs/spec_helpers'
4
27
  require 'mocks'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.29.1
4
+ version: 4.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
- - !ruby/object:Gem::Dependency
56
- name: simplecov
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rake
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -98,14 +84,14 @@ dependencies:
98
84
  name: beaker-abs
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - "~>"
87
+ - - ">="
102
88
  - !ruby/object:Gem::Version
103
89
  version: '0.4'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - "~>"
94
+ - - ">="
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0.4'
111
97
  - !ruby/object:Gem::Dependency
@@ -377,6 +363,7 @@ files:
377
363
  - CONTRIBUTING.md
378
364
  - DOCUMENTING.md
379
365
  - Gemfile
366
+ - HISTORY.md
380
367
  - LICENSE
381
368
  - README.md
382
369
  - Rakefile
@@ -717,7 +704,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
717
704
  - !ruby/object:Gem::Version
718
705
  version: '0'
719
706
  requirements: []
720
- rubygems_version: 3.1.6
707
+ rubygems_version: 3.2.22
721
708
  signing_key:
722
709
  specification_version: 4
723
710
  summary: Let's test Puppet!