summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-12-23 14:06:34 -0800
committerTim Smith <tsmith84@gmail.com>2020-12-23 14:06:34 -0800
commit508f087716c3a3090bda33cf8340eb4cf32c812f (patch)
treeab23f9f04b08f07b5dfb4198a5b25933af779f61
parentb96c55c3689ed838a3541dc266a3fa469a60bd4a (diff)
downloadohai-508f087716c3a3090bda33cf8340eb4cf32c812f.tar.gz
Fix Solaris specs not running + update the specs
The filename didn't include _spec so these were never running. They weren't updated for the last filesystem -> filesystem2 format change we made Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/plugins/solaris2/filesystem_spec.rb (renamed from spec/unit/plugins/solaris2/filesystem.rb)27
1 files changed, 7 insertions, 20 deletions
diff --git a/spec/unit/plugins/solaris2/filesystem.rb b/spec/unit/plugins/solaris2/filesystem_spec.rb
index 50f4ac0e..7786ed90 100644
--- a/spec/unit/plugins/solaris2/filesystem.rb
+++ b/spec/unit/plugins/solaris2/filesystem_spec.rb
@@ -346,13 +346,11 @@ describe Ohai::System, "Solaris2.X filesystem plugin" do
end
it "returns kb_used" do
- expect(plugin[:filesystem]["rpool/VARSHARE"]["kb_used"]).to eq("1181")
- expect(plugin[:filesystem2]["by_pair"]["rpool/VARSHARE,/var/share"]["kb_used"]).to eq("1181")
+ expect(plugin[:filesystem]["by_pair"]["rpool/VARSHARE,/var/share"]["kb_used"]).to eq("1181")
end
it "returns mount" do
- expect(plugin[:filesystem]["rpool/VARSHARE"]["mount"]).to eq("/var/share")
- expect(plugin[:filesystem2]["by_pair"]["rpool/VARSHARE,/var/share"]["mount"]).to eq("/var/share")
+ expect(plugin[:filesystem]["by_pair"]["rpool/VARSHARE,/var/share"]["mount"]).to eq("/var/share")
end
it "returns mount_opts" do
@@ -370,8 +368,7 @@ describe Ohai::System, "Solaris2.X filesystem plugin" do
sharezone=151
dev=4bd0b80
}
- expect(plugin[:filesystem]["rpool/VARSHARE"]["mount_options"]).to eq(opts)
- expect(plugin[:filesystem2]["by_pair"]["rpool/VARSHARE,/var/share"]["mount_options"]).to eq(opts)
+ expect(plugin[:filesystem]["by_pair"]["rpool/VARSHARE,/var/share"]["mount_options"]).to eq(opts)
end
end
@@ -384,23 +381,13 @@ describe Ohai::System, "Solaris2.X filesystem plugin" do
end
it "returns top-level stats" do
- # old API
- expect(plugin[:filesystem]["data0"]["fs_type"]).to eq("zfs")
- expect(plugin[:filesystem]["data0"]["mount"]).to eq("/data0")
-
- # new API
- expect(plugin[:filesystem2]["by_pair"]["data0,/data0"]["fs_type"]).to eq("zfs")
- expect(plugin[:filesystem2]["by_pair"]["data0,/data0"]["mount"]).to eq("/data0")
+ expect(plugin[:filesystem]["by_pair"]["data0,/data0"]["fs_type"]).to eq("zfs")
+ expect(plugin[:filesystem]["by_pair"]["data0,/data0"]["mount"]).to eq("/data0")
end
it "returns zfs-specific properties" do
- # old API
- expect(plugin[:filesystem]["data0"]["zfs_values"]["used"]).to eq("7926803118480")
- expect(plugin[:filesystem]["data0"]["zfs_sources"]["used"]).to eq("-")
-
- # new API
- expect(plugin[:filesystem2]["by_pair"]["data0,/data0"]["zfs_properties"]["used"]["value"]).to eq("7926803118480")
- expect(plugin[:filesystem2]["by_pair"]["data0,/data0"]["zfs_properties"]["used"]["source"]).to eq("-")
+ expect(plugin[:filesystem]["by_pair"]["data0,/data0"]["zfs_properties"]["used"]["value"]).to eq("7926803118480")
+ expect(plugin[:filesystem]["by_pair"]["data0,/data0"]["zfs_properties"]["used"]["source"]).to eq("-")
end
end
end