summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-28 21:37:47 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-28 21:37:47 -0700
commitbb1ff247cb8549bebadcd36df82b2a062ee4ec40 (patch)
tree5e8ff49e67f188c69bb234730e50960749019656
parent146a25b1d46da9ed31bff233b00e5e034a91d350 (diff)
downloadohai-omnios.tar.gz
Remove some duplicate plugin.run callsomnios
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/plugins/solaris2/platform_spec.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/unit/plugins/solaris2/platform_spec.rb b/spec/unit/plugins/solaris2/platform_spec.rb
index 0a1aba99..08bbec74 100644
--- a/spec/unit/plugins/solaris2/platform_spec.rb
+++ b/spec/unit/plugins/solaris2/platform_spec.rb
@@ -46,20 +46,18 @@ describe Ohai::System, "Solaris plugin platform" do
@release = StringIO.new(" SmartOS 20120130T201844Z x86_64\n")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
+ @plugin.run
end
it "runs uname and set platform and build" do
- @plugin.run
expect(@plugin[:platform_build]).to eq("joyent_20120130T201844Z")
end
it "sets the platform" do
- @plugin.run
expect(@plugin[:platform]).to eq("smartos")
end
it "sets the platform_version" do
- @plugin.run
expect(@plugin[:platform_version]).to eq("5.11")
end
@@ -86,20 +84,18 @@ describe Ohai::System, "Solaris plugin platform" do
@release = StringIO.new(" Oracle Solaris 11.1 X86\n")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
+ @plugin.run
end
it "runs uname and set platform and build" do
- @plugin.run
expect(@plugin[:platform_build]).to eq("11.1")
end
it "sets the platform" do
- @plugin.run
expect(@plugin[:platform]).to eq("solaris2")
end
it "sets the platform_version" do
- @plugin.run
expect(@plugin[:platform_version]).to eq("5.11")
end
@@ -126,20 +122,18 @@ describe Ohai::System, "Solaris plugin platform" do
@release = StringIO.new(" OmniOS v11 r151026\n Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.\n Copyright 2018 OmniOS Community Edition (OmniOSce) Association.\n All rights reserved. Use is subject to licence terms.")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
+ @plugin.run
end
it "runs uname and set platform and build" do
- @plugin.run
expect(@plugin[:platform_build]).to eq("omnios-r151026-673c59f55d")
end
it "sets the platform" do
- @plugin.run
expect(@plugin[:platform]).to eq("omnios")
end
it "sets the platform_version" do
- @plugin.run
expect(@plugin[:platform_version]).to eq("151026")
end