diff options
Diffstat (limited to 'spec/unit/plugins/aix')
-rw-r--r-- | spec/unit/plugins/aix/cpu_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/aix/filesystem_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/aix/hostname_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/plugins/aix/kernel_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/aix/memory_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/plugins/aix/network_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/aix/os_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/plugins/aix/platform_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/plugins/aix/uptime_spec.rb | 6 | ||||
-rw-r--r-- | spec/unit/plugins/aix/virtualization_spec.rb | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/spec/unit/plugins/aix/cpu_spec.rb b/spec/unit/plugins/aix/cpu_spec.rb index 5cafedc8..cefd7d3e 100644 --- a/spec/unit/plugins/aix/cpu_spec.rb +++ b/spec/unit/plugins/aix/cpu_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX cpu plugin" do - before(:each) do + before do @lsdev_cc_processor = <<-LSDEV_CC_PROCESSOR proc0 Available 00-00 Processor proc4 Defined 00-04 Processor diff --git a/spec/unit/plugins/aix/filesystem_spec.rb b/spec/unit/plugins/aix/filesystem_spec.rb index 33d63af7..4b457da7 100644 --- a/spec/unit/plugins/aix/filesystem_spec.rb +++ b/spec/unit/plugins/aix/filesystem_spec.rb @@ -18,7 +18,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX filesystem plugin" do - before(:each) do + before do @df_pk_lpar = <<-DF_PK Filesystem 1024-blocks Used Available Capacity Mounted on /dev/hd4 2097152 219796 1877356 11% / diff --git a/spec/unit/plugins/aix/hostname_spec.rb b/spec/unit/plugins/aix/hostname_spec.rb index b378dd0a..56b76dd4 100644 --- a/spec/unit/plugins/aix/hostname_spec.rb +++ b/spec/unit/plugins/aix/hostname_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX hostname plugin" do - before(:each) do + before do @plugin = get_plugin("hostname") allow(@plugin).to receive(:collect_os).and_return(:aix) allow(@plugin).to receive(:from_cmd).with("hostname -s").and_return("aix_admin") @@ -27,7 +27,7 @@ describe Ohai::System, "AIX hostname plugin" do @plugin.run end - it "should set the machinename" do + it "sets the machinename" do expect(@plugin[:machinename]).to eql("aix_admin") end end diff --git a/spec/unit/plugins/aix/kernel_spec.rb b/spec/unit/plugins/aix/kernel_spec.rb index a63023d6..fde6d135 100644 --- a/spec/unit/plugins/aix/kernel_spec.rb +++ b/spec/unit/plugins/aix/kernel_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX kernel plugin" do - before(:each) do + before do @plugin = get_plugin("aix/kernel") allow(@plugin).to receive(:collect_os).and_return(:aix) allow(@plugin).to receive(:shell_out).with("uname -s").and_return(mock_shell_out(0, "AIX", nil)) diff --git a/spec/unit/plugins/aix/memory_spec.rb b/spec/unit/plugins/aix/memory_spec.rb index cfe9862f..be652626 100644 --- a/spec/unit/plugins/aix/memory_spec.rb +++ b/spec/unit/plugins/aix/memory_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX memory plugin" do - before(:each) do + before do @plugin = get_plugin("aix/memory") allow(@plugin).to receive(:collect_os).and_return(:aix) allow(@plugin).to receive(:shell_out).with("svmon -G -O unit=MB,summary=longreal | grep '[0-9]'").and_return(mock_shell_out(0, " 513280.00 340034.17 173245.83 62535.17 230400.05 276950.14 70176.00\n", nil)) @@ -27,22 +27,22 @@ describe Ohai::System, "AIX memory plugin" do allow(@plugin).to receive(:shell_out).with("swap -s").and_return(mock_shell_out(0, @swap_s, nil)) end - it "should get total memory" do + it "gets total memory" do @plugin.run expect(@plugin["memory"]["total"]).to eql("#{513280 * 1024}kB") end - it "should get free memory" do + it "gets free memory" do @plugin.run expect(@plugin["memory"]["free"]).to eql("#{173245.83.to_i * 1024}kB") end - it "should get total swap" do + it "gets total swap" do @plugin.run expect(@plugin["memory"]["swap"]["total"]).to eql( "#{23887872 * 4}kB") end - it "should get free swap" do + it "gets free swap" do @plugin.run expect(@plugin["memory"]["swap"]["free"]).to eql( "#{23598960 * 4}kB") end diff --git a/spec/unit/plugins/aix/network_spec.rb b/spec/unit/plugins/aix/network_spec.rb index 1007a868..ca19df77 100644 --- a/spec/unit/plugins/aix/network_spec.rb +++ b/spec/unit/plugins/aix/network_spec.rb @@ -20,7 +20,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX network plugin" do - before(:each) do + before do @netstat_rn_grep_default = <<-NETSTAT_RN_GREP_DEFAULT default 172.31.8.1 UG 2 121789 en0 - - NETSTAT_RN_GREP_DEFAULT diff --git a/spec/unit/plugins/aix/os_spec.rb b/spec/unit/plugins/aix/os_spec.rb index 6cc2227d..ded3335f 100644 --- a/spec/unit/plugins/aix/os_spec.rb +++ b/spec/unit/plugins/aix/os_spec.rb @@ -18,18 +18,18 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "AIX os plugin" do - before(:each) do + before do @plugin = get_plugin("aix/os") allow(@plugin).to receive(:collect_os).and_return(:aix) allow(@plugin).to receive(:shell_out).with("oslevel -s").and_return(mock_shell_out(0, "7200-00-01-1543\n", nil)) @plugin.run end - it "should set the top-level os attribute" do - expect(@plugin[:os]).to eql(:aix) + it "sets the top-level os attribute" do + expect(@plugin[:os]).to be(:aix) end - it "should set the top-level os_level attribute" do + it "sets the top-level os_level attribute" do expect(@plugin[:os_version]).to eql("7200-00-01-1543") end end diff --git a/spec/unit/plugins/aix/platform_spec.rb b/spec/unit/plugins/aix/platform_spec.rb index 318bc427..2f3199e5 100644 --- a/spec/unit/plugins/aix/platform_spec.rb +++ b/spec/unit/plugins/aix/platform_spec.rb @@ -19,7 +19,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "Aix plugin platform" do - before(:each) do + before do @plugin = get_plugin("aix/platform") allow(@plugin).to receive(:collect_os).and_return(:aix) kernel = Mash.new @@ -30,15 +30,15 @@ describe Ohai::System, "Aix plugin platform" do @plugin.run end - it "should set platform to aix" do + it "sets platform to aix" do expect(@plugin[:platform]).to eq("aix") end - it "should set the platform_version" do + it "sets the platform_version" do expect(@plugin[:platform_version]).to eq("7.1") end - it "should set platform_family" do + it "sets platform_family" do expect(@plugin[:platform_family]).to eq(@plugin[:platform]) end end diff --git a/spec/unit/plugins/aix/uptime_spec.rb b/spec/unit/plugins/aix/uptime_spec.rb index 071e561b..0520cb55 100644 --- a/spec/unit/plugins/aix/uptime_spec.rb +++ b/spec/unit/plugins/aix/uptime_spec.rb @@ -20,7 +20,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb") describe Ohai::System, "Aix plugin uptime" do - before(:each) do + before do @plugin = get_plugin("aix/uptime") allow(@plugin).to receive(:collect_os).and_return(:aix) allow(Time).to receive_message_chain(:now, :to_i).and_return(1412072511) @@ -31,11 +31,11 @@ describe Ohai::System, "Aix plugin uptime" do @plugin.run end - it "should set uptime_seconds to uptime" do + it "sets uptime_seconds to uptime" do expect(@plugin[:uptime_seconds]).to eq(511191) end - it "should set uptime to a human readable date" do + it "sets uptime to a human readable date" do expect(@plugin[:uptime]).to eq("5 days 21 hours 59 minutes 51 seconds") end end diff --git a/spec/unit/plugins/aix/virtualization_spec.rb b/spec/unit/plugins/aix/virtualization_spec.rb index 4d07f814..3ca71eea 100644 --- a/spec/unit/plugins/aix/virtualization_spec.rb +++ b/spec/unit/plugins/aix/virtualization_spec.rb @@ -31,7 +31,7 @@ describe Ohai::System, "AIX virtualization plugin" do p end - before(:each) do + before do @lswpar_l = <<-LSWPAR_L ================================================================= applejack-541ba3 - Active |