beaker 4.27.0 → 4.29.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +22 -0
- data/.github/workflows/test.yml +30 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +112 -68
- data/LICENSE +189 -3
- data/Rakefile +0 -2
- data/beaker.gemspec +7 -6
- data/docs/how_to/ssh_connection_preference.md +4 -1
- data/lib/beaker/dsl/helpers/web_helpers.rb +3 -4
- data/lib/beaker/host.rb +1 -0
- data/lib/beaker/host/pswindows/exec.rb +1 -1
- data/lib/beaker/host/unix/exec.rb +79 -34
- data/lib/beaker/host/unix/pkg.rb +13 -0
- data/lib/beaker/host_prebuilt_steps.rb +4 -1
- data/lib/beaker/platform.rb +6 -5
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/helpers/web_helpers_spec.rb +2 -2
- data/spec/beaker/host/pswindows/exec_spec.rb +5 -6
- data/spec/beaker/host/unix/exec_spec.rb +226 -98
- data/spec/beaker/host_prebuilt_steps_spec.rb +23 -0
- data/spec/beaker/options/subcommand_options_parser_spec.rb +8 -8
- data/spec/beaker/platform_spec.rb +5 -0
- metadata +34 -19
- data/.travis.yml +0 -10
@@ -12,6 +12,7 @@ describe Beaker do
|
|
12
12
|
let( :unix_only_pkgs ) { Beaker::HostPrebuiltSteps::UNIX_PACKAGES }
|
13
13
|
let( :sles_only_pkgs ) { Beaker::HostPrebuiltSteps::SLES_PACKAGES }
|
14
14
|
let( :rhel8_packages ) { Beaker::HostPrebuiltSteps::RHEL8_PACKAGES }
|
15
|
+
let( :fedora_packages) { Beaker::HostPrebuiltSteps::FEDORA_PACKAGES }
|
15
16
|
let( :platform ) { @platform || 'unix' }
|
16
17
|
let( :ip ) { "ip.address.0.0" }
|
17
18
|
let( :stdout) { @stdout || ip }
|
@@ -159,6 +160,15 @@ describe Beaker do
|
|
159
160
|
subject.timesync(hosts, options)
|
160
161
|
end
|
161
162
|
|
163
|
+
it "can sync time on Fedora hosts" do
|
164
|
+
hosts = make_hosts(:platform => 'fedora-32-x86_64')
|
165
|
+
expect(Beaker::Command).to receive(:new)
|
166
|
+
.with("chronyc add server #{ntpserver} prefer trust;chronyc makestep;chronyc burst 1/2")
|
167
|
+
.exactly(3)
|
168
|
+
.times
|
169
|
+
subject.timesync(hosts, options)
|
170
|
+
end
|
171
|
+
|
162
172
|
it "can set time server on unix hosts" do
|
163
173
|
hosts = make_hosts( { :platform => 'unix' } )
|
164
174
|
|
@@ -450,6 +460,19 @@ describe Beaker do
|
|
450
460
|
subject.validate_host(hosts, options)
|
451
461
|
end
|
452
462
|
|
463
|
+
it "can validate Fedora hosts" do
|
464
|
+
@platform = 'fedora-32-x86_64'
|
465
|
+
|
466
|
+
hosts.each do |host|
|
467
|
+
fedora_packages.each do |pkg|
|
468
|
+
expect(host).to receive(:check_for_package).with(pkg).once.and_return(false)
|
469
|
+
expect(host).to receive(:install_package).with(pkg).once
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
subject.validate_host(hosts, options)
|
474
|
+
end
|
475
|
+
|
453
476
|
it 'skips validation on cisco hosts' do
|
454
477
|
@platform = 'cisco_nexus-7-x86_64'
|
455
478
|
expect( subject ).to receive( :check_and_install_packages_if_needed ).never
|
@@ -4,8 +4,9 @@ module Beaker
|
|
4
4
|
module Options
|
5
5
|
describe '#parse_subcommand_options' do
|
6
6
|
let(:home_options_file_path) {ENV['HOME']+'/.beaker/subcommand_options.yaml'}
|
7
|
-
let(
|
8
|
-
let( :
|
7
|
+
let(:parser_mod) { Beaker::Options::SubcommandOptionsParser }
|
8
|
+
let( :parser ) {parser_mod.parse_subcommand_options(argv, options_file)}
|
9
|
+
let( :file_parser ){parser_mod.parse_options_file({})}
|
9
10
|
let( :argv ) {[]}
|
10
11
|
let( :options_file ) {""}
|
11
12
|
|
@@ -26,14 +27,14 @@ module Beaker
|
|
26
27
|
let( :argv ) {['provision']}
|
27
28
|
let(:options_file) {Beaker::Subcommands::SubcommandUtil::SUBCOMMAND_OPTIONS}
|
28
29
|
it 'calls parse_options_file with subcommand options file when home_dir is false' do
|
29
|
-
allow(
|
30
|
-
allow(
|
30
|
+
allow(parser_mod).to receive(:execute_subcommand?).with('provision').and_return true
|
31
|
+
allow(parser_mod).to receive(:parse_options_file).with(Beaker::Subcommands::SubcommandUtil::SUBCOMMAND_OPTIONS)
|
31
32
|
end
|
32
33
|
|
33
34
|
let( :options_file ) {home_options_file_path}
|
34
35
|
it 'calls parse_options_file with home directory options file when home_dir is true' do
|
35
|
-
allow(
|
36
|
-
allow(
|
36
|
+
allow(parser_mod).to receive(:execute_subcommand?).with('provision').and_return true
|
37
|
+
allow(parser_mod).to receive(:parse_options_file).with(home_options_file_path)
|
37
38
|
end
|
38
39
|
|
39
40
|
it 'checks for file existence and loads the YAML file' do
|
@@ -49,8 +50,7 @@ module Beaker
|
|
49
50
|
expect(parser).to be_kind_of(OptionsHash)
|
50
51
|
expect(parser).to be_empty
|
51
52
|
end
|
52
|
-
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
56
|
-
end
|
56
|
+
end
|
@@ -67,6 +67,11 @@ module Beaker
|
|
67
67
|
|
68
68
|
context 'with_version_codename' do
|
69
69
|
|
70
|
+
it "can convert debian-11-xxx to debian-bullseye-xxx" do
|
71
|
+
@name = 'debian-11-xxx'
|
72
|
+
expect( platform.with_version_codename ).to be === 'debian-bullseye-xxx'
|
73
|
+
end
|
74
|
+
|
70
75
|
it "can convert debian-7-xxx to debian-wheezy-xxx" do
|
71
76
|
@name = 'debian-7-xxx'
|
72
77
|
expect( platform.with_version_codename ).to be === 'debian-wheezy-xxx'
|
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.
|
4
|
+
version: 4.29.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,20 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 0.14.0
|
47
|
+
version: '1.0'
|
51
48
|
type: :development
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version: '0
|
58
|
-
- - "<"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 0.14.0
|
54
|
+
version: '1.0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: simplecov
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +72,14 @@ dependencies:
|
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
75
|
+
version: '13.0'
|
82
76
|
type: :development
|
83
77
|
prerelease: false
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
80
|
- - "~>"
|
87
81
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
82
|
+
version: '13.0'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
name: beaker-aws
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,6 +192,20 @@ dependencies:
|
|
198
192
|
- - "~>"
|
199
193
|
- !ruby/object:Gem::Version
|
200
194
|
version: 0.5.3
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rexml
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
201
209
|
- !ruby/object:Gem::Dependency
|
202
210
|
name: hocon
|
203
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -230,16 +238,22 @@ dependencies:
|
|
230
238
|
name: net-scp
|
231
239
|
requirement: !ruby/object:Gem::Requirement
|
232
240
|
requirements:
|
233
|
-
- - "
|
241
|
+
- - ">="
|
234
242
|
- !ruby/object:Gem::Version
|
235
243
|
version: '1.2'
|
244
|
+
- - "<"
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
version: '4.0'
|
236
247
|
type: :runtime
|
237
248
|
prerelease: false
|
238
249
|
version_requirements: !ruby/object:Gem::Requirement
|
239
250
|
requirements:
|
240
|
-
- - "
|
251
|
+
- - ">="
|
241
252
|
- !ruby/object:Gem::Version
|
242
253
|
version: '1.2'
|
254
|
+
- - "<"
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '4.0'
|
243
257
|
- !ruby/object:Gem::Dependency
|
244
258
|
name: inifile
|
245
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -346,17 +360,18 @@ dependencies:
|
|
346
360
|
version: '0'
|
347
361
|
description: Puppet's accceptance testing harness
|
348
362
|
email:
|
349
|
-
-
|
363
|
+
- voxpupuli@groups.io
|
350
364
|
executables:
|
351
365
|
- beaker
|
352
366
|
extensions: []
|
353
367
|
extra_rdoc_files: []
|
354
368
|
files:
|
355
369
|
- ".github/dependabot.yml"
|
370
|
+
- ".github/workflows/release.yml"
|
371
|
+
- ".github/workflows/test.yml"
|
356
372
|
- ".gitignore"
|
357
373
|
- ".rspec"
|
358
374
|
- ".simplecov"
|
359
|
-
- ".travis.yml"
|
360
375
|
- CHANGELOG.md
|
361
376
|
- CODEOWNERS
|
362
377
|
- CONTRIBUTING.md
|
@@ -683,9 +698,9 @@ files:
|
|
683
698
|
- spec/mock_vsphere_helper.rb
|
684
699
|
- spec/mocks.rb
|
685
700
|
- spec/spec_helper.rb
|
686
|
-
homepage: https://github.com/
|
701
|
+
homepage: https://github.com/voxpupuli/beaker
|
687
702
|
licenses:
|
688
|
-
-
|
703
|
+
- Apache-2.0
|
689
704
|
metadata: {}
|
690
705
|
post_install_message:
|
691
706
|
rdoc_options: []
|
@@ -702,7 +717,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
702
717
|
- !ruby/object:Gem::Version
|
703
718
|
version: '0'
|
704
719
|
requirements: []
|
705
|
-
rubygems_version: 3.
|
720
|
+
rubygems_version: 3.1.6
|
706
721
|
signing_key:
|
707
722
|
specification_version: 4
|
708
723
|
summary: Let's test Puppet!
|