diff options
author | Tim Smith <tsmith@chef.io> | 2019-07-19 11:15:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 11:15:36 -0700 |
commit | 8a7b5dcee1d0f28350da2bf824b32b87bd7f507a (patch) | |
tree | fcc93f17af1a3f68c3318271155401e5fdc86d8b | |
parent | f531daf0c714a8d97ca0e11748a9ca94a345f5cc (diff) | |
parent | ae55917efc2b7ef0002ca4f4912d33950fb78d48 (diff) | |
download | ohai-8a7b5dcee1d0f28350da2bf824b32b87bd7f507a.tar.gz |
Merge pull request #1388 from BackSlasher/master
Translating platform "archarm" to "arch"
-rw-r--r-- | lib/ohai/plugins/linux/platform.rb | 1 | ||||
-rw-r--r-- | spec/unit/plugins/linux/platform_spec.rb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index cc5598fd..45f94744 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -32,6 +32,7 @@ Ohai.plugin(:Platform) do "opensuse-leap" => "opensuseleap", "xenenterprise" => "xenserver", "cumulus-linux" => "cumulus", + "archarm" => "arch", }.freeze # @deprecated diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb index 0fdc397b..3255192c 100644 --- a/spec/unit/plugins/linux/platform_spec.rb +++ b/spec/unit/plugins/linux/platform_spec.rb @@ -101,6 +101,11 @@ describe Ohai::System, "Linux plugin platform" do expect(plugin.platform_id_remap("sles_sap")).to eq("suse") end + # https://github.com/chef/os_release/blob/master/archarm + it "returns arch for archarm" do + expect(plugin.platform_id_remap("archarm")).to eq("arch") + 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") |