summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/fixtures/unit/provider/mount/mount-output.aix.txt7
-rwxr-xr-xspec/unit/provider/mount_spec.rb8
2 files changed, 15 insertions, 0 deletions
diff --git a/spec/fixtures/unit/provider/mount/mount-output.aix.txt b/spec/fixtures/unit/provider/mount/mount-output.aix.txt
new file mode 100644
index 000000000..54edb9c1c
--- /dev/null
+++ b/spec/fixtures/unit/provider/mount/mount-output.aix.txt
@@ -0,0 +1,7 @@
+/dev/hd4 / jfs2 Nov 11 12:11 rw,log=/dev/hd8
+/dev/hd2 /usr jfs2 Nov 11 12:11 rw,log=/dev/hd8
+/dev/hd9var /var jfs2 Nov 11 12:11 rw,log=/dev/hd8
+/dev/hd3 /tmp jfs2 Nov 11 12:11 rw,log=/dev/hd8
+/dev/hd1 /home jfs2 Nov 11 12:11 rw,log=/dev/hd8
+/proc /proc procfs Nov 11 12:11 rw
+/dev/hd10opt /opt jfs2 Nov 11 12:11 rw,log=/dev/hd8
diff --git a/spec/unit/provider/mount_spec.rb b/spec/unit/provider/mount_spec.rb
index b034214ee..f567a4a40 100755
--- a/spec/unit/provider/mount_spec.rb
+++ b/spec/unit/provider/mount_spec.rb
@@ -120,6 +120,14 @@ describe Puppet::Provider::Mount do
@mounter.should be_mounted
end
+ it "should match mounted devices if the operating system is AIX" do
+ Facter.stubs(:value).with("operatingsystem").returns("AIX")
+ mount_data = File.read(File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'unit', 'provider', 'mount', 'mount-output.aix.txt'))
+ @mounter.expects(:mountcmd).returns(mount_data)
+
+ @mounter.should be_mounted
+ end
+
it "should match ' on <name>' if the operating system is not Darwin, Solaris, or HP-UX" do
Facter.stubs(:value).with("operatingsystem").returns("Debian")
@mounter.expects(:mountcmd).returns("/dev/dsk/whatever on / and stuff\n/dev/other/disk on /var and stuff")