diff options
-rw-r--r-- | lib/ohai/plugins/linux/platform.rb | 1 | ||||
-rw-r--r-- | spec/unit/plugins/linux/platform_spec.rb | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index 96beb4cf..e620184f 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -28,6 +28,7 @@ Ohai.plugin(:Platform) do "rhel" => "redhat", "amzn" => "amazon", "ol" => "oracle", + "sled" => "suse", "sles" => "suse", "opensuse-leap" => "opensuseleap", "xenenterprise" => "xenserver", diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb index 5560fc84..f7628ce9 100644 --- a/spec/unit/plugins/linux/platform_spec.rb +++ b/spec/unit/plugins/linux/platform_spec.rb @@ -81,30 +81,42 @@ describe Ohai::System, "Linux plugin platform" do end describe "#platform_id_remap" do + # https://github.com/chef/os_release/blob/master/redhat_7 it "returns redhat for rhel os-release id" do expect(plugin.platform_id_remap("rhel")).to eq("redhat") end + # https://github.com/chef/os_release/blob/master/amazon_2018 it "returns amazon for amzn os-release id" do expect(plugin.platform_id_remap("amzn")).to eq("amazon") end + # https://github.com/chef/os_release/blob/master/oracle_7 it "returns oracle for ol os-release id" do expect(plugin.platform_id_remap("ol")).to eq("oracle") end + # https://github.com/chef/os_release/blob/master/sled_15 + it "returns suse for sled os-release id" do + expect(plugin.platform_id_remap("sled")).to eq("suse") + end + + # https://github.com/chef/os_release/blob/master/sles_15_0 it "returns suse for sles os-release id" do expect(plugin.platform_id_remap("sles")).to eq("suse") end + # https://github.com/chef/os_release/blob/master/opensuseleap_15_0 it "returns opensuseleap for opensuse-leap os-release id" do expect(plugin.platform_id_remap("opensuse-leap")).to eq("opensuseleap") end + # https://github.com/chef/os_release/blob/master/xenserver_7_6 it "returns xenserver for xenenterprise os-release id" do expect(plugin.platform_id_remap("xenenterprise")).to eq("xenserver") end + # https://github.com/chef/os_release/blob/master/cumulus_3_7 it "returns cumulus for cumulus-linux os-release id" do expect(plugin.platform_id_remap("cumulus-linux")).to eq("cumulus") end |