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 authored and shubhamshinde360 committed Nov 8, 2023
1 parent 9c0721f commit 0608946
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
32 changes: 17 additions & 15 deletions lib/beaker/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ 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",
"buster" => "10",
"stretch" => "9",
"jessie" => "8",
"wheezy" => "7",
"squeeze" => "6",
},
:ubuntu => { "jammy" => "2204",
"focal" => "2004",
"eoan" => "1910",
"disco" => "1904",
"cosmic" => "1810",
"bionic" => "1804",
"artful" => "1710",
"zesty" => "1704",
{ :debian => { "forky" => "14",
"trixie" => "13",
"bookworm" => "12",
"bullseye" => "11",
"buster" => "10",
"stretch" => "9",
"jessie" => "8",
"wheezy" => "7",
"squeeze" => "6", },
:ubuntu => { "jammy" => "2204",
"focal" => "2004",
"eoan" => "1910",
"disco" => "1904",
"cosmic" => "1810",
"bionic" => "1804",
"artful" => "1710",
"zesty" => "1704",
"yakkety" => "1610",
"xenial" => "1604",
"wily" => "1510",
Expand Down
14 changes: 14 additions & 0 deletions spec/beaker/platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ 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'
Expand Down

0 comments on commit 0608946

Please sign in to comment.