summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-10-04 08:17:21 -0700
committerGitHub <noreply@github.com>2018-10-04 08:17:21 -0700
commitabe39af77fdd1ab3ede57fc7b424800befd35eb1 (patch)
tree50f9072c2b3fbb809e52cca858a6fae3d0a06d91 /spec
parente1c5a1c38bd044e2a94e6e9de013a3ea6277793a (diff)
parent2a32b86a5b6e5dae17c9677e2537ea9007cd8026 (diff)
downloadohai-abe39af77fdd1ab3ede57fc7b424800befd35eb1.tar.gz
Merge pull request #1262 from jaymzh/unify_cpu_plugin
Unify the cpu plugin
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/plugins/aix/cpu_spec.rb2
-rw-r--r--spec/unit/plugins/darwin/cpu_spec.rb2
-rw-r--r--spec/unit/plugins/freebsd/cpu_spec.rb4
-rw-r--r--spec/unit/plugins/linux/cpu_spec.rb6
-rw-r--r--spec/unit/plugins/solaris2/cpu_spec.rb2
-rw-r--r--spec/unit/plugins/windows/cpu_spec.rb2
6 files changed, 9 insertions, 9 deletions
diff --git a/spec/unit/plugins/aix/cpu_spec.rb b/spec/unit/plugins/aix/cpu_spec.rb
index 5fd0b34c..f571afa8 100644
--- a/spec/unit/plugins/aix/cpu_spec.rb
+++ b/spec/unit/plugins/aix/cpu_spec.rb
@@ -40,7 +40,7 @@ LSATTR_EL
CPU 3 runs at 1654 MHz
PMCYCLES_M
- @plugin = get_plugin("aix/cpu")
+ @plugin = get_plugin("cpu")
allow(@plugin).to receive(:collect_os).and_return(:aix)
allow(@plugin).to receive(:shell_out).with("lsdev -Cc processor").and_return(mock_shell_out(0, @lsdev_cc_processor, nil))
diff --git a/spec/unit/plugins/darwin/cpu_spec.rb b/spec/unit/plugins/darwin/cpu_spec.rb
index 8743283e..aa30a17e 100644
--- a/spec/unit/plugins/darwin/cpu_spec.rb
+++ b/spec/unit/plugins/darwin/cpu_spec.rb
@@ -20,7 +20,7 @@ require_relative "../../../spec_helper.rb"
describe Ohai::System, "Darwin cpu plugin" do
before(:each) do
- @plugin = get_plugin("darwin/cpu")
+ @plugin = get_plugin("cpu")
@stdout = <<~CTL
hw.ncpu: 8
hw.byteorder: 1234
diff --git a/spec/unit/plugins/freebsd/cpu_spec.rb b/spec/unit/plugins/freebsd/cpu_spec.rb
index 2b71a417..9f96f33b 100644
--- a/spec/unit/plugins/freebsd/cpu_spec.rb
+++ b/spec/unit/plugins/freebsd/cpu_spec.rb
@@ -20,7 +20,7 @@ require_relative "../../../spec_helper.rb"
describe Ohai::System, "FreeBSD cpu plugin on FreeBSD >=10.2" do
before(:each) do
- @plugin = get_plugin("freebsd/cpu")
+ @plugin = get_plugin("cpu")
allow(@plugin).to receive(:collect_os).and_return(:freebsd)
@double_file = double("/var/run/dmesg.boot")
allow(@double_file).to receive(:each)
@@ -95,7 +95,7 @@ end
describe Ohai::System, "FreeBSD cpu plugin on FreeBSD <=10.1" do
before(:each) do
- @plugin = get_plugin("freebsd/cpu")
+ @plugin = get_plugin("cpu")
allow(@plugin).to receive(:collect_os).and_return(:freebsd)
allow(@plugin).to receive(:shell_out).with("sysctl -n hw.ncpu").and_return(mock_shell_out(0, "2", ""))
@double_file = double("/var/run/dmesg.boot")
diff --git a/spec/unit/plugins/linux/cpu_spec.rb b/spec/unit/plugins/linux/cpu_spec.rb
index a34345d8..a23cfd74 100644
--- a/spec/unit/plugins/linux/cpu_spec.rb
+++ b/spec/unit/plugins/linux/cpu_spec.rb
@@ -77,7 +77,7 @@ shared_examples "arm64 processor info" do |cpu_no, bogomips, features|
end
describe Ohai::System, "General Linux cpu plugin" do
- let(:plugin) { get_plugin("linux/cpu") }
+ let(:plugin) { get_plugin("cpu") }
let(:tempfile_handle) do
tempfile = Tempfile.new("ohai-rspec-proc-cpuinfo")
@@ -361,7 +361,7 @@ describe Ohai::System, "General Linux cpu plugin" do
end
describe Ohai::System, "S390 linux cpu plugin" do
- let(:plugin) { get_plugin("linux/cpu") }
+ let(:plugin) { get_plugin("cpu") }
before(:each) do
allow(plugin).to receive(:collect_os).and_return(:linux)
@@ -408,7 +408,7 @@ describe Ohai::System, "S390 linux cpu plugin" do
end
describe Ohai::System, "arm64 linux cpu plugin" do
- let(:plugin) { get_plugin("linux/cpu") }
+ let(:plugin) { get_plugin("cpu") }
before(:each) do
allow(plugin).to receive(:collect_os).and_return(:linux)
diff --git a/spec/unit/plugins/solaris2/cpu_spec.rb b/spec/unit/plugins/solaris2/cpu_spec.rb
index d5b9ff76..acee1cbc 100644
--- a/spec/unit/plugins/solaris2/cpu_spec.rb
+++ b/spec/unit/plugins/solaris2/cpu_spec.rb
@@ -18,7 +18,7 @@ require_relative "../../../spec_helper.rb"
describe Ohai::System, "Solaris2.X cpu plugin" do
before(:each) do
- @plugin = get_plugin("solaris2/cpu")
+ @plugin = get_plugin("cpu")
allow(@plugin).to receive(:collect_os).and_return("solaris2")
end
diff --git a/spec/unit/plugins/windows/cpu_spec.rb b/spec/unit/plugins/windows/cpu_spec.rb
index 5849d5a3..451af6d3 100644
--- a/spec/unit/plugins/windows/cpu_spec.rb
+++ b/spec/unit/plugins/windows/cpu_spec.rb
@@ -62,7 +62,7 @@ end
describe Ohai::System, "Windows cpu plugin" do
before(:each) do
- @plugin = get_plugin("windows/cpu")
+ @plugin = get_plugin("cpu")
allow(@plugin).to receive(:collect_os).and_return(:windows)
@double_wmi = double(WmiLite::Wmi)