summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-18 12:43:20 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-18 12:43:20 -0800
commit5a2ed2e6876245d021d62b884b1c0083b56921cf (patch)
tree32a923b699242be62fdee753c807292580098ed6
parentc8fc5004072d9eaec0801af4707b4d5487402d95 (diff)
downloadohai-5a2ed2e6876245d021d62b884b1c0083b56921cf.tar.gz
Just set the aix platform / platform_family directly
If we're in a collect block for aix then we're on aix. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/aix/platform.rb4
-rw-r--r--spec/unit/plugins/aix/platform_spec.rb3
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/ohai/plugins/aix/platform.rb b/lib/ohai/plugins/aix/platform.rb
index 10e67030..4dae93f6 100644
--- a/lib/ohai/plugins/aix/platform.rb
+++ b/lib/ohai/plugins/aix/platform.rb
@@ -23,8 +23,8 @@ Ohai.plugin(:Platform) do
depends "kernel"
collect_data(:aix) do
- platform kernel[:name]
+ platform "aix"
+ platform_family "aix"
platform_version [kernel[:version], kernel[:release]].join(".")
- platform_family platform
end
end
diff --git a/spec/unit/plugins/aix/platform_spec.rb b/spec/unit/plugins/aix/platform_spec.rb
index 99ef56b1..db9a2389 100644
--- a/spec/unit/plugins/aix/platform_spec.rb
+++ b/spec/unit/plugins/aix/platform_spec.rb
@@ -18,12 +18,11 @@
require "spec_helper"
-describe Ohai::System, "Aix plugin platform" do
+describe Ohai::System, "AIX plugin platform" do
before do
@plugin = get_plugin("aix/platform")
allow(@plugin).to receive(:collect_os).and_return(:aix)
kernel = Mash.new
- kernel[:name] = "aix"
kernel[:version] = "7"
kernel[:release] = "1"
allow(@plugin).to receive(:kernel).and_return(kernel)