Signed-off-by: Luke Kanies <[email protected]>
---
spec/unit/util/selinux.rb | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
mode change 100644 => 100755 spec/unit/util/selinux.rb
diff --git a/spec/unit/util/selinux.rb b/spec/unit/util/selinux.rb
old mode 100644
new mode 100755
index d5ec6d2..da4686e
--- 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
--
1.6.1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---