summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-07-24 15:32:48 -0700
committerLuke Kanies <luke@madstop.com>2009-07-24 15:32:48 -0700
commitb418921fb846e7d083c39a9556810ff067878e86 (patch)
tree16c2a33633d7d8c266d9c890a6b2f99fef12d5dc
parent719e76b8ce5293cb30c70e62cf3182c6149e2620 (diff)
downloadpuppet-b418921fb846e7d083c39a9556810ff067878e86.tar.gz
puppet-b418921fb846e7d083c39a9556810ff067878e86.tar.xz
puppet-b418921fb846e7d083c39a9556810ff067878e86.zip
Fixing selinux tests broken in the fix for #1963
Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-x[-rw-r--r--]spec/unit/util/selinux.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/unit/util/selinux.rb b/spec/unit/util/selinux.rb
index d5ec6d2d4..da4686ec4 100644..100755
--- a/spec/unit/util/selinux.rb
+++ b/spec/unit/util/selinux.rb
@@ -32,9 +32,8 @@ describe Puppet::Util::SELinux do
describe "filesystem detection" do
before :each do
fh = stub 'fh', :close => nil
- File.stubs(:open).with("/proc/mounts", File::NONBLOCK).returns fh
- fh.stubs(:read).returns "rootfs / rootfs rw 0 0\n/dev/root / ext3 rw,relatime,errors=continue,user_xattr,acl,data=ordered 0 0\n/dev /dev tmpfs rw,relatime,mode=755 0 0\n/proc /proc proc rw,relatime 0 0\n/sys /sys sysfs rw,relatime 0 0\n192.168.1.1:/var/export /mnt/nfs nfs rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.1,mountvers=3,mountproto=udp,addr=192.168.1.1 0 0\n"
- fh.stubs(:close)
+ File.stubs(:open).with("/proc/mounts").returns fh
+ fh.expects(:read_nonblock).times(2).returns("rootfs / rootfs rw 0 0\n/dev/root / ext3 rw,relatime,errors=continue,user_xattr,acl,data=ordered 0 0\n/dev /dev tmpfs rw,relatime,mode=755 0 0\n/proc /proc proc rw,relatime 0 0\n/sys /sys sysfs rw,relatime 0 0\n192.168.1.1:/var/export /mnt/nfs nfs rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nointr,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.1,mountvers=3,mountproto=udp,addr=192.168.1.1 0 0\n").then.raises EOFError
end
it "should parse the contents of /proc/mounts" do