beaker 6.0.0 → 6.1.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: a57ed9140c38bb9b99f44eccf0f30a892213eb1e7014ded3cbb424bebc3ec26b
4
+ data.tar.gz: 25e1254d10f91d1deb9d28780cac16871b57ff570bd67978df38666a961592bc
5
5
  SHA512:
6
- metadata.gz: 7428fcbccda27a250f1d224ede4f6431e854a91f8e9ab64c690a1dd4b2fc5a2b7850793d764e8ca885d5b3d654c36b2e9409d8928320b20acdb55003b843c1ae
7
- data.tar.gz: 8cd11c359dfe66ddb64de2762296f261cbc71ad39d95e3c9c92f1825bd0389f6a2b979826e4372c8a1cc0de36ea7b503910206cb97d0031b5be16bfcfe9358c8
6
+ metadata.gz: a7d2bab439fbe31b20df6417453e66bb5e148489c605946c11f1f3ac2eb637c4bfe4a2d2ac81420866184c1fa491825e1918ae84c56f3b9c446aa0eae76d6d4c
7
+ data.tar.gz: 41b577a099d6441fe6c95d8fe8a6c6885ca9d8276ae09b1d98e2efa5f8a5c050f2e7e94313e10d3397c42e3fab8c792e93af1d47843812150dd5c6389afdc289
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.1.0](https://github.com/voxpupuli/beaker/tree/6.1.0) (2024-06-04)
4
+
5
+ **Implemented enhancements:**
6
+
7
+ - Add package logic for Amazon Linux 2 [\#1887](https://github.com/voxpupuli/beaker/pull/1884) ([mhashizume](https://github.com/joshcooper))
8
+
3
9
  ## [6.0.0](https://github.com/voxpupuli/beaker/tree/6.0.0) (2024-05-24)
4
10
 
5
11
  **Breaking changes:**
@@ -85,7 +85,7 @@ module Unix::Pkg
85
85
  when /amazon-2023|el-(8|9|1[0-9])|fedora/
86
86
  name = "#{name}-#{version}" if version
87
87
  execute("dnf -y #{cmdline_args} install #{name}", opts)
88
- when /amazon-7|centos|redhat|el-[1-7]-/
88
+ when /amazon-(2|7)|centos|redhat|el-[1-7]-/
89
89
  name = "#{name}-#{version}" if version
90
90
  execute("yum -y #{cmdline_args} install #{name}", opts)
91
91
  when /ubuntu|debian/
@@ -167,7 +167,7 @@ module Unix::Pkg
167
167
  execute("zypper --non-interactive rm #{name}", opts)
168
168
  when /amazon-2023|el-(8|9|1[0-9])|fedora/
169
169
  execute("dnf -y #{cmdline_args} remove #{name}", opts)
170
- when /amazon-7|centos|redhat|el-[1-7]-/
170
+ when /amazon-(2|7)|centos|redhat|el-[1-7]-/
171
171
  execute("yum -y #{cmdline_args} remove #{name}", opts)
172
172
  when /ubuntu|debian/
173
173
  execute("apt-get purge #{cmdline_args} -y #{name}", opts)
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '6.0.0'
3
+ STRING = '6.1.0'
4
4
  end
5
5
  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)
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.1.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-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fakefs