beaker 4.29.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/CHANGELOG.md +6 -0
- data/lib/beaker/host/unix/exec.rb +3 -1
- data/lib/beaker/host_prebuilt_steps.rb +4 -1
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/host_prebuilt_steps_spec.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9dde6d3115c1e75993890082fb188bb858ba64d5d62d1f332c1614f0da106d3
|
4
|
+
data.tar.gz: 2c9f2f21992cfb485756eff3249b3f530894e359fbb183eee840a66091773f4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34066a115a337b515eb8222a659ee4e2adec97cf4ecb4d44593a153e6a1f9189523f76b99d8c5f64a2acbf270f427a1ed108d4d88e6bebc559a4a4d022b183a0
|
7
|
+
data.tar.gz: a79c9f4c5cf94337a21cb4f31191e031c3748c8fb8232f31df8f1cc65c3d5e279a1855b887e9fdd5cd5f25925e126e1ca3eef858b501202a5dbcaaad0c2a9daa
|
data/CHANGELOG.md
CHANGED
@@ -20,6 +20,12 @@ The headers used in [Keep a Changelog](http://keepachangelog.com) are:
|
|
20
20
|
- Fixed - for any bug fixes.
|
21
21
|
- Security - in case of vulnerabilities.
|
22
22
|
|
23
|
+
# [4.29.1](https://github.com/voxpupuli/beaker/compare/4.29.0...4.29.1) - 25-05-2021
|
24
|
+
|
25
|
+
### Fixed
|
26
|
+
|
27
|
+
- Fixed `vagrant*` matching in the unix `get_ip()`
|
28
|
+
|
23
29
|
# [4.29.0](https://github.com/voxpupuli/beaker/compare/4.28.1...4.29.0) - 19-05-2021
|
24
30
|
|
25
31
|
### Added
|
@@ -138,7 +138,9 @@ module Unix::Exec
|
|
138
138
|
if self['platform'].include?('solaris') || self['platform'].include?('osx')
|
139
139
|
execute("ifconfig -a inet| awk '/broadcast/ {print $2}' | cut -d/ -f1 | head -1").strip
|
140
140
|
else
|
141
|
-
|
141
|
+
|
142
|
+
pipe_cmd = "#{self['hypervisor']}".include?('vagrant') ? 'tail' : 'head'
|
143
|
+
execute("ip a | awk '/global/{print$2}' | cut -d/ -f1 | #{pipe_cmd} -1").strip
|
142
144
|
end
|
143
145
|
end
|
144
146
|
|
@@ -13,6 +13,7 @@ module Beaker
|
|
13
13
|
SLEEPWAIT = 5
|
14
14
|
TRIES = 5
|
15
15
|
RHEL8_PACKAGES = ['curl', 'chrony']
|
16
|
+
FEDORA_PACKAGES = ['curl', 'chrony']
|
16
17
|
UNIX_PACKAGES = ['curl', 'ntpdate']
|
17
18
|
FREEBSD_PACKAGES = ['curl', 'perl5|perl']
|
18
19
|
OPENBSD_PACKAGES = ['curl']
|
@@ -52,7 +53,7 @@ module Beaker
|
|
52
53
|
logger.notify "NTP date succeeded on #{host}"
|
53
54
|
else
|
54
55
|
case
|
55
|
-
when host['platform'] =~ /el-8/
|
56
|
+
when host['platform'] =~ /el-8|fedora/
|
56
57
|
ntp_command = "chronyc add server #{ntp_server} prefer trust;chronyc makestep;chronyc burst 1/2"
|
57
58
|
when host['platform'] =~ /sles-/
|
58
59
|
ntp_command = "sntp #{ntp_server}"
|
@@ -126,6 +127,8 @@ module Beaker
|
|
126
127
|
check_and_install_packages_if_needed(host, SOLARIS11_PACKAGES)
|
127
128
|
when host['platform'] =~ /archlinux/
|
128
129
|
check_and_install_packages_if_needed(host, ARCHLINUX_PACKAGES)
|
130
|
+
when host['platform'] =~ /fedora/
|
131
|
+
check_and_install_packages_if_needed(host, FEDORA_PACKAGES)
|
129
132
|
when host['platform'] !~ /debian|aix|solaris|windows|sles-|osx-|cumulus|f5-|netscaler|cisco_/
|
130
133
|
check_and_install_packages_if_needed(host, UNIX_PACKAGES)
|
131
134
|
end
|
data/lib/beaker/version.rb
CHANGED
@@ -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
|
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.
|
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: 2021-05-
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|