diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-12-23 13:38:30 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-12-23 13:38:30 -0800 |
commit | b96c55c3689ed838a3541dc266a3fa469a60bd4a (patch) | |
tree | f62a1bb61688ef366bc83fecbc1b4bbfeccfc91f | |
parent | 8d9acd0bd3253f059d4085da0f9920fe4e3d11aa (diff) | |
download | ohai-b96c55c3689ed838a3541dc266a3fa469a60bd4a.tar.gz |
Update the specs to remove tests on filesystem2
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/unit/plugins/aix/filesystem_spec.rb | 22 | ||||
-rw-r--r-- | spec/unit/plugins/bsd/filesystem_spec.rb | 11 |
2 files changed, 0 insertions, 33 deletions
diff --git a/spec/unit/plugins/aix/filesystem_spec.rb b/spec/unit/plugins/aix/filesystem_spec.rb index 02bec7fb..a016d8c8 100644 --- a/spec/unit/plugins/aix/filesystem_spec.rb +++ b/spec/unit/plugins/aix/filesystem_spec.rb @@ -100,61 +100,50 @@ describe Ohai::System, "AIX filesystem plugin" do describe "df -Pk" do it "returns the filesystem block size" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["kb_size"]).to eq("2097152") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["kb_size"]).to eq("2097152") end it "returns the filesystem used space in kb" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["kb_used"]).to eq("219796") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["kb_used"]).to eq("219796") end it "returns the filesystem available space in kb" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["kb_available"]).to eq("1877356") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["kb_available"]).to eq("1877356") end it "returns the filesystem capacity in percentage" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["percent_used"]).to eq("11%") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["percent_used"]).to eq("11%") end it "returns the filesystem mounted location" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["mount"]).to eq("/") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["mount"]).to eq("/") end end describe "mount" do it "returns the filesystem mount location" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["mount"]).to eq("/") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["mount"]).to eq("/") end it "returns the filesystem type" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["fs_type"]).to eq("jfs2") - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["fs_type"]).to eq("jfs2") end it "returns the filesystem mount options" do expect(@plugin[:filesystem]["by_pair"]["/dev/hd4,/"]["mount_options"]).to eq(["rw", "log=/dev/hd8"]) - expect(@plugin[:filesystem2]["by_pair"]["/dev/hd4,/"]["mount_options"]).to eq(["rw", "log=/dev/hd8"]) end # For entries like 192.168.1.11 /stage/middleware1 /stage/middleware2 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys context "having node values" do it "returns the filesystem mount location" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["mount"]).to eq("/stage/middleware2") - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["mount"]).to eq("/stage/middleware2") end it "returns the filesystem type" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["fs_type"]).to eq("nfs3") - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["fs_type"]).to eq("nfs3") end it "returns the filesystem mount options" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware1,/stage/middleware2"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) end end end @@ -170,61 +159,50 @@ describe Ohai::System, "AIX filesystem plugin" do describe "df -Pk" do it "returns the filesystem block size" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["kb_size"]).to eq("10485760") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["kb_size"]).to eq("10485760") end it "returns the filesystem used space in kb" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["kb_used"]).to eq("130872") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["kb_used"]).to eq("130872") end it "returns the filesystem available space in kb" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["kb_available"]).to eq("10354888") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["kb_available"]).to eq("10354888") end it "returns the filesystem capacity in percentage" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["percent_used"]).to eq("2%") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["percent_used"]).to eq("2%") end it "returns the filesystem mounted location" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["mount"]).to eq("/") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["mount"]).to eq("/") end end describe "mount" do it "returns the filesystem mount location" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["mount"]).to eq("/") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["mount"]).to eq("/") end it "returns the filesystem type" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["fs_type"]).to eq("jfs2") - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["fs_type"]).to eq("jfs2") end it "returns the filesystem mount options" do expect(@plugin[:filesystem]["by_pair"]["Global:/,/"]["mount_options"]).to eq(["rw", "log=NULL"]) - expect(@plugin[:filesystem2]["by_pair"]["Global:/,/"]["mount_options"]).to eq(["rw", "log=NULL"]) end # For entries like 192.168.1.11 /stage/middleware3 /stage/middleware4 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys context "having node values" do it "returns the filesystem mount location" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["mount"]).to eq("/stage/middleware4") - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["mount"]).to eq("/stage/middleware4") end it "returns the filesystem type" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["fs_type"]).to eq("nfs3") - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["fs_type"]).to eq("nfs3") end it "returns the filesystem mount options" do expect(@plugin[:filesystem]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) - expect(@plugin[:filesystem2]["by_pair"]["192.168.1.11:/stage/middleware3,/stage/middleware4"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) end end end diff --git a/spec/unit/plugins/bsd/filesystem_spec.rb b/spec/unit/plugins/bsd/filesystem_spec.rb index 7629f815..741666e5 100644 --- a/spec/unit/plugins/bsd/filesystem_spec.rb +++ b/spec/unit/plugins/bsd/filesystem_spec.rb @@ -56,49 +56,41 @@ describe Ohai::System, "BSD filesystem plugin" do it "sets kb_size to value from df" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:kb_size]).to eq("9637788") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:kb_size]).to eq("9637788") end it "sets kb_used to value from df" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:kb_used]).to eq("3313504") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:kb_used]).to eq("3313504") end it "sets kb_available to value from df" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:kb_available]).to eq("5553264") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:kb_available]).to eq("5553264") end it "sets percent_used to value from df" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:percent_used]).to eq("37%") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:percent_used]).to eq("37%") end it "sets mount to value from df" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:mount]).to eq("/") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:mount]).to eq("/") end it "sets total_inodes to value from df -iP" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:total_inodes]).to eq("1043326") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:total_inodes]).to eq("1043326") end it "sets inodes_used to value from df -iP" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:inodes_used]).to eq("252576") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:inodes_used]).to eq("252576") end it "sets inodes_available to value from df -iP" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:inodes_available]).to eq("790750") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:inodes_available]).to eq("790750") end end @@ -119,19 +111,16 @@ describe Ohai::System, "BSD filesystem plugin" do it "sets mount to value from mount" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:mount]).to eq("/") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:mount]).to eq("/") end it "sets fs_type to value from mount" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:fs_type]).to eq("ufs") - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:fs_type]).to eq("ufs") end it "sets mount_options to an array of values from mount" do plugin.run expect(plugin[:filesystem]["by_pair"]["/dev/ada0p2,/"][:mount_options]).to eq(["local", "journaled soft-updates"]) - expect(plugin[:filesystem2]["by_pair"]["/dev/ada0p2,/"][:mount_options]).to eq(["local", "journaled soft-updates"]) end end |