Skip to content

Commit

Permalink
Add Debian 12 - 14 support
Browse files Browse the repository at this point in the history
  • Loading branch information
yachub committed Sep 12, 2023
1 parent 183274d commit 9bbeaea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/beaker/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ class Platform < String
PLATFORMS = /^(alpine|huaweios|cisco_nexus|cisco_ios_xr|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|opensuse|sles|ubuntu|windows|solaris|aix|archlinux|el|eos|cumulus|f5|netscaler)\-.+\-.+$/
# Platform version numbers vs. codenames conversion hash
PLATFORM_VERSION_CODES =
{ :debian => { "bullseye" => "11",
{ :debian => { "forky" => "14",
"trixie" => "13",
"bookworm" => "12",
"bullseye" => "11",
"buster" => "10",
"stretch" => "9",
"jessie" => "8",
Expand Down
15 changes: 15 additions & 0 deletions spec/beaker/platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ module Beaker
end

context 'with_version_codename' do
it "can convert debian-14-xxx to debian-forky-xxx" do
@name = 'debian-14-xxx'
expect(platform.with_version_codename).to be === 'debian-forky-xxx'
end

it "can convert debian-13-xxx to debian-trixie-xxx" do
@name = 'debian-13-xxx'
expect(platform.with_version_codename).to be === 'debian-trixie-xxx'
end

it "can convert debian-12-xxx to debian-bookworm-xxx" do
@name = 'debian-12-xxx'
expect(platform.with_version_codename).to be === 'debian-bookworm-xxx'
end

it "can convert debian-11-xxx to debian-bullseye-xxx" do
@name = 'debian-11-xxx'
expect(platform.with_version_codename).to be === 'debian-bullseye-xxx'
Expand Down

0 comments on commit 9bbeaea

Please sign in to comment.