beaker 6.0.0 → 6.2.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: 6f50bf08da3941bdb936808fbf3239d476331a4d2f842ed073a565ed3cd19040
4
- data.tar.gz: a75ef8fd5402e0113683d1609057a659022812ed67abfaa1f0c41cace52db742
3
+ metadata.gz: 77c1a3954ba46fdb90013e09113edb3b0e9f4976da6ed8598befc0e0c4faf54a
4
+ data.tar.gz: 8a514875b6013196ee000cd5fe1fa430057c80408511d6e6be1e28c37fd6e651
5
5
  SHA512:
6
- metadata.gz: 7428fcbccda27a250f1d224ede4f6431e854a91f8e9ab64c690a1dd4b2fc5a2b7850793d764e8ca885d5b3d654c36b2e9409d8928320b20acdb55003b843c1ae
7
- data.tar.gz: 8cd11c359dfe66ddb64de2762296f261cbc71ad39d95e3c9c92f1825bd0389f6a2b979826e4372c8a1cc0de36ea7b503910206cb97d0031b5be16bfcfe9358c8
6
+ metadata.gz: b142270c19368140de4dc01202d20c366d2ea914704c00d37eefb869d92136858063935b1780e8b08e0cc5afc1accd605951d93da06994584945fcbd8f97e9ca
7
+ data.tar.gz: cd3e194d4e98dfcf5c01eeb22ede113561c20ae54d90d3ce8e95cfa19b864d5ca65bbc0e3f4f25b583354100b7177e71d73620652ca7ad34c7991fb3c47aa5f1
@@ -22,8 +22,7 @@ jobs:
22
22
  run: bundle exec rake rubocop
23
23
 
24
24
  test:
25
- # CentOS 7 testing is broken on Ubuntu 22.04
26
- runs-on: ubuntu-20.04
25
+ runs-on: ubuntu-latest
27
26
  strategy:
28
27
  fail-fast: false
29
28
  matrix:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.2.0](https://github.com/voxpupuli/beaker/tree/6.2.0) (2024-07-24)
4
+
5
+ **Implemented enhancements:**
6
+
7
+ - Debian: Replace apt-get with apt for updates [\#1890](https://github.com/voxpupuli/beaker/pull/1890) ([bastelfreak](https://github.com/bastelfreak))
8
+
9
+ **Fixed bugs:**
10
+
11
+ - EL8/9 & Fedora: Install iputils [\#1893](https://github.com/voxpupuli/beaker/pull/1893) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ ## [6.1.0](https://github.com/voxpupuli/beaker/tree/6.1.0) (2024-06-04)
14
+
15
+ **Implemented enhancements:**
16
+
17
+ - Add package logic for Amazon Linux 2 [\#1887](https://github.com/voxpupuli/beaker/pull/1884) ([mhashizume](https://github.com/joshcooper))
18
+
3
19
  ## [6.0.0](https://github.com/voxpupuli/beaker/tree/6.0.0) (2024-05-24)
4
20
 
5
21
  **Breaking changes:**
data/Rakefile CHANGED
@@ -67,11 +67,11 @@ def hosts_opt(use_preserved_hosts = false)
67
67
  end
68
68
 
69
69
  def agent_target
70
- ENV['TEST_TARGET'] || 'centos7-64af'
70
+ ENV['TEST_TARGET'] || 'centos9-64af'
71
71
  end
72
72
 
73
73
  def master_target
74
- ENV['MASTER_TEST_TARGET'] || 'centos7-64default.mdcal'
74
+ ENV['MASTER_TEST_TARGET'] || 'centos9-64default.mdcal'
75
75
  end
76
76
 
77
77
  def test_targets
@@ -17,6 +17,8 @@ def get_host_pkg(host)
17
17
  Beaker::HostPrebuiltSteps::OPENBSD_PACKAGES
18
18
  when /solaris-10/
19
19
  Beaker::HostPrebuiltSteps::SOLARIS10_PACKAGES
20
+ when /el-[89]/
21
+ Beaker::HostPrebuiltSteps::RHEL8_PACKAGES
20
22
  else
21
23
  Beaker::HostPrebuiltSteps::UNIX_PACKAGES
22
24
  end
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', '~> 2.7.0'
25
+ s.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'
26
26
 
27
27
  # Run time dependencies
28
28
  s.add_runtime_dependency 'minitar', '~> 0.6'
@@ -62,7 +62,8 @@ module Unix::Pkg
62
62
  return unless /debian|ubuntu/.match?(self['platform'])
63
63
  return unless @apt_needs_update
64
64
 
65
- execute("apt-get update")
65
+ # -qq: Only output errors to stdout
66
+ execute("apt-get update -qq")
66
67
  @apt_needs_update = false
67
68
  end
68
69
 
@@ -85,7 +86,7 @@ module Unix::Pkg
85
86
  when /amazon-2023|el-(8|9|1[0-9])|fedora/
86
87
  name = "#{name}-#{version}" if version
87
88
  execute("dnf -y #{cmdline_args} install #{name}", opts)
88
- when /amazon-7|centos|redhat|el-[1-7]-/
89
+ when /amazon-(2|7)|centos|redhat|el-[1-7]-/
89
90
  name = "#{name}-#{version}" if version
90
91
  execute("yum -y #{cmdline_args} install #{name}", opts)
91
92
  when /ubuntu|debian/
@@ -167,7 +168,7 @@ module Unix::Pkg
167
168
  execute("zypper --non-interactive rm #{name}", opts)
168
169
  when /amazon-2023|el-(8|9|1[0-9])|fedora/
169
170
  execute("dnf -y #{cmdline_args} remove #{name}", opts)
170
- when /amazon-7|centos|redhat|el-[1-7]-/
171
+ when /amazon-(2|7)|centos|redhat|el-[1-7]-/
171
172
  execute("yum -y #{cmdline_args} remove #{name}", opts)
172
173
  when /ubuntu|debian/
173
174
  execute("apt-get purge #{cmdline_args} -y #{name}", opts)
@@ -263,7 +264,8 @@ module Unix::Pkg
263
264
  execute("zypper --non-interactive --no-gpg-checks in #{onhost_package_file}")
264
265
  when /^(debian|ubuntu)$/
265
266
  execute("dpkg -i --force-all #{onhost_package_file}")
266
- execute("apt-get update")
267
+ # -qq: Only output errors to stdout
268
+ execute("apt-get update -qq")
267
269
  when /^solaris$/
268
270
  self.solaris_install_local_package(onhost_package_file, onhost_copy_dir)
269
271
  when /^osx$/
@@ -11,8 +11,8 @@ module Beaker
11
11
  SLEEPWAIT = 5
12
12
  TRIES = 5
13
13
  AMAZON2023_PACKAGES = %w[chrony]
14
- RHEL8_PACKAGES = %w[chrony]
15
- FEDORA_PACKAGES = %w[chrony]
14
+ RHEL8_PACKAGES = %w[chrony iputils] # iputils provides ping. beaker assumes that's present
15
+ FEDORA_PACKAGES = %w[chrony iputils]
16
16
  UNIX_PACKAGES = %w[curl ntpdate]
17
17
  FREEBSD_PACKAGES = ['curl', 'perl5|perl']
18
18
  OPENBSD_PACKAGES = ['curl']
@@ -204,7 +204,8 @@ module Beaker
204
204
  # @param [Host, Array<Host>] hosts One or more hosts to act upon
205
205
  def apt_get_update hosts
206
206
  block_on hosts do |host|
207
- host.exec(Command.new("apt-get update")) if /ubuntu|debian/.match?(host[:platform])
207
+ # -qq: Only output errors to stdout
208
+ host.exec(Command.new("apt-get update -qq")) if /ubuntu|debian/.match?(host[:platform])
208
209
  end
209
210
  end
210
211
 
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '6.0.0'
3
+ STRING = '6.2.0'
4
4
  end
5
5
  end
@@ -128,7 +128,7 @@ module Beaker
128
128
  it "calls update for #{platform}" do
129
129
  @opts = { 'platform' => platform }
130
130
  instance.instance_variable_set(:@apt_needs_update, true)
131
- expect(instance).to receive('execute').with("apt-get update")
131
+ expect(instance).to receive('execute').with("apt-get update -qq")
132
132
  expect { instance.update_apt_if_needed }.not_to raise_error
133
133
  end
134
134
  end
@@ -161,7 +161,7 @@ module Beaker
161
161
  expect(instance.install_package(pkg)).to eq "hello"
162
162
  end
163
163
 
164
- it "uses yum on amazon linux 2" do
164
+ it "uses yum on misnamed amazon linux 7" do
165
165
  @opts = { 'platform' => "amazon-7-is-me" }
166
166
  pkg = 'amazon_package'
167
167
  expect(Beaker::Command).to receive(:new).with("yum -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
@@ -169,6 +169,14 @@ module Beaker
169
169
  expect(instance.install_package(pkg)).to eq "hello"
170
170
  end
171
171
 
172
+ it "uses yum on amazon linux 2" do
173
+ @opts = { 'platform' => "amazon-2-is-me" }
174
+ pkg = 'amazon_package'
175
+ expect(Beaker::Command).to receive(:new).with("yum -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('')
176
+ expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 }))
177
+ expect(instance.install_package(pkg)).to eq "hello"
178
+ end
179
+
172
180
  it "uses pacman on archlinux" do
173
181
  @opts = { 'platform' => 'archlinux-is-me' }
174
182
  pkg = 'archlinux_package'
@@ -281,7 +289,7 @@ module Beaker
281
289
 
282
290
  it 'Amazon Linux 2 uses yum' do
283
291
  @platform = platform
284
- @version = '7'
292
+ @version = '2'
285
293
  package_file = 'test_123.yay'
286
294
  expect(instance).to receive(:execute).with(/^yum.*#{package_file}$/)
287
295
  instance.install_local_package(package_file)
@@ -301,7 +309,7 @@ module Beaker
301
309
  %w[debian ubuntu].each do |platform|
302
310
  @platform = platform
303
311
  expect(instance).to receive(:execute).with(/^dpkg.*#{package_file}$/)
304
- expect(instance).to receive(:execute).with('apt-get update')
312
+ expect(instance).to receive(:execute).with('apt-get update -qq')
305
313
  instance.install_local_package(package_file)
306
314
  end
307
315
  end
@@ -227,7 +227,7 @@ describe Beaker do
227
227
  it "can perform apt-get on ubuntu hosts" do
228
228
  host = make_host('testhost', { :platform => 'ubuntu' })
229
229
 
230
- expect(Beaker::Command).to receive(:new).with("apt-get update").once
230
+ expect(Beaker::Command).to receive(:new).with("apt-get update -qq").once
231
231
 
232
232
  subject.apt_get_update(host)
233
233
  end
@@ -235,7 +235,7 @@ describe Beaker do
235
235
  it "can perform apt-get on debian hosts" do
236
236
  host = make_host('testhost', { :platform => 'debian' })
237
237
 
238
- expect(Beaker::Command).to receive(:new).with("apt-get update").once
238
+ expect(Beaker::Command).to receive(:new).with("apt-get update -qq").once
239
239
 
240
240
  subject.apt_get_update(host)
241
241
  end
data/spec/helpers.rb CHANGED
@@ -124,6 +124,7 @@ module PlatformHelpers
124
124
 
125
125
  REDHATPLATFORMS = %w[
126
126
  amazon-2023
127
+ amazon-2
127
128
  fedora
128
129
  el-
129
130
  centos
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: 6.0.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-28 00:00:00.000000000 Z
11
+ date: 2024-08-03 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: 2.7.0
61
+ version: 2.8.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: 2.7.0
68
+ version: 2.8.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitar
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -640,7 +640,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
640
640
  - !ruby/object:Gem::Version
641
641
  version: '0'
642
642
  requirements: []
643
- rubygems_version: 3.5.9
643
+ rubygems_version: 3.5.11
644
644
  signing_key:
645
645
  specification_version: 4
646
646
  summary: Let's test Puppet!