Skip to content

Commit

Permalink
Merge e03ae4b into 183274d
Browse files Browse the repository at this point in the history
  • Loading branch information
yachub committed Sep 11, 2023
2 parents 183274d + e03ae4b commit 5d8710e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/beaker/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ 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 => { "bookworm" => "12",
"bullseye" => "11",
"buster" => "10",
"stretch" => "9",
"jessie" => "8",
Expand Down
5 changes: 5 additions & 0 deletions spec/beaker/platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ module Beaker
end

context 'with_version_codename' do
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 5d8710e

Please sign in to comment.