diff options
author | Joshua Justice <jjustice6@bloomberg.net> | 2018-05-21 14:27:53 -0400 |
---|---|---|
committer | Joshua Justice <jjustice6@bloomberg.net> | 2018-05-21 14:27:53 -0400 |
commit | 3b2aea7848eee5e1780cc75b1da778c6864a4751 (patch) | |
tree | eeda9a14aa19a6f3683d5047f24e99fe41af232f /spec | |
parent | 7f2b2c9db58e0b7a4d10a1e6c7914beeacdaccd0 (diff) | |
download | ohai-3b2aea7848eee5e1780cc75b1da778c6864a4751.tar.gz |
Fix an issue caused by using the wrong field in the AIX filesystem plugin.
Also alters the test to reveal the exact nature of the issue.
Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/plugins/aix/filesystem_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/plugins/aix/filesystem_spec.rb b/spec/unit/plugins/aix/filesystem_spec.rb index 3ca3dcf8..481fe70a 100644 --- a/spec/unit/plugins/aix/filesystem_spec.rb +++ b/spec/unit/plugins/aix/filesystem_spec.rb @@ -69,7 +69,7 @@ DF_PK /dev/hd11admin /admin jfs2 Jul 17 13:22 rw,log=/dev/hd8 /proc /proc procfs Jul 17 13:22 rw /dev/hd10opt /opt jfs2 Jul 17 13:22 rw,log=/dev/hd8 -192.168.1.11 /stage/middleware /stage/middleware nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys +192.168.1.11 /stage/middleware1 /stage/middleware2 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys MOUNT @mount_wpar = <<-MOUNT @@ -82,7 +82,7 @@ MOUNT Global /tmp jfs2 Nov 23 21:03 rw,log=NULL Global /usr jfs2 Nov 23 21:03 rw,log=NULL Global /var jfs2 Nov 23 21:03 rw,log=NULL -192.168.1.11 /stage/middleware /stage/middleware nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys +192.168.1.11 /stage/middleware3 /stage/middleware4 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys MOUNT @plugin = get_plugin("aix/filesystem") @@ -134,19 +134,19 @@ MOUNT expect(@plugin[:filesystem]["/dev/hd4"]["mount_options"]).to eq(["rw", "log=/dev/hd8"]) end - # For entries like 192.168.1.11 /stage/middleware /stage/middleware nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys + # 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]["192.168.1.11:/stage/middleware"]["mount"]).to eq("/stage/middleware") + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware1"]["mount"]).to eq("/stage/middleware2") end it "returns the filesystem type" do - expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware"]["fs_type"]).to eq("nfs3") + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware1"]["fs_type"]).to eq("nfs3") end it "returns the filesystem mount options" do - expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware1"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) end end end @@ -196,19 +196,19 @@ MOUNT expect(@plugin[:filesystem]["Global:/"]["mount_options"]).to eq(["rw", "log=NULL"]) end - # For entries like 192.168.1.11 /stage/middleware /stage/middleware nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys + # 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]["192.168.1.11:/stage/middleware"]["mount"]).to eq("/stage/middleware") + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware3"]["mount"]).to eq("/stage/middleware4") end it "returns the filesystem type" do - expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware"]["fs_type"]).to eq("nfs3") + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware3"]["fs_type"]).to eq("nfs3") end it "returns the filesystem mount options" do - expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) + expect(@plugin[:filesystem]["192.168.1.11:/stage/middleware3"]["mount_options"]).to eq(["ro", "bg", "hard", "intr", "sec=sys"]) end end end |