beaker 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/beaker.gemspec +1 -1
- data/lib/beaker/cli.rb +3 -3
- data/lib/beaker/host/unix/pkg.rb +4 -4
- data/lib/beaker/host.rb +1 -5
- data/lib/beaker/options/hosts_file_parser.rb +1 -0
- data/lib/beaker/platform.rb +1 -3
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/host/unix/pkg_spec.rb +12 -36
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f99a4862979da16eeca708167851a6cc41356ef28f5093ffaf8b486687eb8ea
|
4
|
+
data.tar.gz: e9ca97f27f048c0aae5bba989ab7ed23491cb9ca111ab359b1b1b791c72fbf96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29286dc6b82ff7f399dc24757be5a45770d1fa144d99c9287f6abadabda0bb1330acc7a67ee71b196029f68ae7ca5f526a79725ef281ff25ae64f81f110d48d5
|
7
|
+
data.tar.gz: 160d6a88237f9f53b6ee0b384858ab0c411eeb477f331e3262aba5f179c6f07e1c3f72cb2c3a8ad3fef2366609004198f58c1421c1e15f08c79fb3578a159251
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [5.6.0](https://github.com/voxpupuli/beaker/tree/5.6.0) (2023-11-23)
|
4
|
+
|
5
|
+
**Implemented enhancements:**
|
6
|
+
|
7
|
+
- Use DNF for Amazon Linux 2023 [\#1832](https://github.com/voxpupuli/beaker/pull/1832) ([mhashizume](https://github.com/mhashizume))
|
8
|
+
- Use DNF for Fedora, newer Enterprise Linux [\#1835](https://github.com/voxpupuli/beaker/pull/1835) ([mhashizume](https://github.com/mhashizume))
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- Permit PlatformTagContainer class for beaker hosts [\#1833](https://github.com/voxpupuli/beaker/pull/1833) ([tlehman](https://github.com/tlehman))
|
13
|
+
|
3
14
|
## [5.5.0](https://github.com/voxpupuli/beaker/tree/5.5.0) (2023-10-02)
|
4
15
|
|
5
16
|
[Full Changelog](https://github.com/voxpupuli/beaker/compare/5.4.0...5.5.0)
|
data/beaker.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency 'fakefs', '~> 2.4'
|
23
23
|
s.add_development_dependency 'rake', '~> 13.0'
|
24
24
|
s.add_development_dependency 'rspec', '~> 3.0'
|
25
|
-
s.add_development_dependency 'voxpupuli-rubocop', '~>
|
25
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 2.0.0'
|
26
26
|
|
27
27
|
# Run time dependencies
|
28
28
|
s.add_runtime_dependency 'minitar', '~> 0.6'
|
data/lib/beaker/cli.rb
CHANGED
@@ -106,7 +106,7 @@ module Beaker
|
|
106
106
|
end
|
107
107
|
|
108
108
|
# Setup perf monitoring if needed
|
109
|
-
@perf = Beaker::Perf.new(@hosts, @options) if /
|
109
|
+
@perf = Beaker::Perf.new(@hosts, @options) if /aggressive|normal/.match?(@options[:collect_perf_data].to_s)
|
110
110
|
|
111
111
|
# pre acceptance phase
|
112
112
|
run_suite(:pre_suite, :fast)
|
@@ -138,7 +138,7 @@ module Beaker
|
|
138
138
|
end
|
139
139
|
|
140
140
|
# cleanup on error
|
141
|
-
if /
|
141
|
+
if /never|onpass/.match?(@options[:preserve_hosts].to_s)
|
142
142
|
@logger.notify "Cleanup: cleaning up after failed run"
|
143
143
|
@network_manager.cleanup if @network_manager
|
144
144
|
else
|
@@ -159,7 +159,7 @@ module Beaker
|
|
159
159
|
end
|
160
160
|
|
161
161
|
# cleanup on success
|
162
|
-
if /
|
162
|
+
if /never|onfail/.match?(@options[:preserve_hosts].to_s)
|
163
163
|
@logger.notify "Cleanup: cleaning up after successful run"
|
164
164
|
@network_manager.cleanup if @network_manager
|
165
165
|
else
|
data/lib/beaker/host/unix/pkg.rb
CHANGED
@@ -87,10 +87,10 @@ module Unix::Pkg
|
|
87
87
|
execute("zypper --non-interactive --gpg-auto-import-keys in #{name}", opts)
|
88
88
|
when /el-4/
|
89
89
|
@logger.debug("Package installation not supported on rhel4")
|
90
|
-
when /amazon|
|
90
|
+
when /amazon-2023|el-(8|9|1[0-9])|fedora/
|
91
91
|
name = "#{name}-#{version}" if version
|
92
92
|
execute("dnf -y #{cmdline_args} install #{name}", opts)
|
93
|
-
when /cisco|
|
93
|
+
when /cisco|centos|redhat|eos|el-[1-7]-/
|
94
94
|
name = "#{name}-#{version}" if version
|
95
95
|
execute("yum -y #{cmdline_args} install #{name}", opts)
|
96
96
|
when /ubuntu|debian|cumulus|huaweios/
|
@@ -172,9 +172,9 @@ module Unix::Pkg
|
|
172
172
|
execute("zypper --non-interactive rm #{name}", opts)
|
173
173
|
when /el-4/
|
174
174
|
@logger.debug("Package uninstallation not supported on rhel4")
|
175
|
-
when /amazon|
|
175
|
+
when /amazon-2023|el-(8|9|1[0-9])|fedora/
|
176
176
|
execute("dnf -y #{cmdline_args} remove #{name}", opts)
|
177
|
-
when /cisco|
|
177
|
+
when /cisco|centos|redhat|eos|el-[1-7]-/
|
178
178
|
execute("yum -y #{cmdline_args} remove #{name}", opts)
|
179
179
|
when /ubuntu|debian|cumulus|huaweios/
|
180
180
|
execute("apt-get purge #{cmdline_args} -y #{name}", opts)
|
data/lib/beaker/host.rb
CHANGED
@@ -489,11 +489,7 @@ module Beaker
|
|
489
489
|
# We enable achieve mode and compression
|
490
490
|
rsync_args << "-az"
|
491
491
|
|
492
|
-
user =
|
493
|
-
"root"
|
494
|
-
else
|
495
|
-
self['user']
|
496
|
-
end
|
492
|
+
user = self['user'] || 'root'
|
497
493
|
hostname_with_user = "#{user}@#{reachable_name}"
|
498
494
|
|
499
495
|
Rsync.host = hostname_with_user
|
data/lib/beaker/platform.rb
CHANGED
@@ -117,9 +117,7 @@ module Beaker
|
|
117
117
|
# @example Platform.new('debian-7-xxx').with_version_codename == 'debian-wheezy-xxx'
|
118
118
|
# @return [String] the platform string with the platform version represented as a codename
|
119
119
|
def with_version_codename
|
120
|
-
|
121
|
-
version_array = [@variant, @codename, @arch] if @codename
|
122
|
-
return version_array.join('-')
|
120
|
+
[@variant, @codename || @version, @arch].join('-')
|
123
121
|
end
|
124
122
|
|
125
123
|
# Returns the platform string with the platform version as a number. If no conversion is necessary
|
data/lib/beaker/version.rb
CHANGED
@@ -175,24 +175,12 @@ module Beaker
|
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
expect(instance.install_package(pkg)).to be == "hello"
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
(22..39).to_a.each do |fedora_release|
|
189
|
-
it "uses dnf on fedora-#{fedora_release}" do
|
190
|
-
@opts = { 'platform' => "fedora-#{fedora_release}-is-me" }
|
191
|
-
pkg = 'fedora_package'
|
192
|
-
expect(Beaker::Command).to receive(:new).with("dnf -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
|
193
|
-
expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
|
194
|
-
expect(instance.install_package(pkg)).to be == "hello"
|
195
|
-
end
|
178
|
+
it "uses dnf on fedora" do
|
179
|
+
@opts = { 'platform' => "fedora-is-me" }
|
180
|
+
pkg = 'fedora_package'
|
181
|
+
expect(Beaker::Command).to receive(:new).with("dnf -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
|
182
|
+
expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
|
183
|
+
expect(instance.install_package(pkg)).to be == "hello"
|
196
184
|
end
|
197
185
|
|
198
186
|
it "uses dnf on amazon-2023" do
|
@@ -221,24 +209,12 @@ module Beaker
|
|
221
209
|
expect(instance.uninstall_package('pkg')).to be == "hello"
|
222
210
|
end
|
223
211
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
expect(instance.uninstall_package(pkg)).to be == "hello"
|
231
|
-
end
|
232
|
-
end
|
233
|
-
|
234
|
-
(22..39).to_a.each do |fedora_release|
|
235
|
-
it "uses dnf on fedora-#{fedora_release}" do
|
236
|
-
@opts = { 'platform' => "fedora-#{fedora_release}-is-me" }
|
237
|
-
pkg = 'fedora_package'
|
238
|
-
expect(Beaker::Command).to receive(:new).with("dnf -y remove #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
|
239
|
-
expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
|
240
|
-
expect(instance.uninstall_package(pkg)).to be == "hello"
|
241
|
-
end
|
212
|
+
it "uses dnf on fedora" do
|
213
|
+
@opts = { 'platform' => "fedora-is-me" }
|
214
|
+
pkg = 'fedora_package'
|
215
|
+
expect(Beaker::Command).to receive(:new).with("dnf -y remove #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
|
216
|
+
expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
|
217
|
+
expect(instance.uninstall_package(pkg)).to be == "hello"
|
242
218
|
end
|
243
219
|
end
|
244
220
|
end
|
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: 5.
|
4
|
+
version: 5.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakefs
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.0.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.0.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitar
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|