diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 20:28:45 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 20:28:45 +0000 |
| commit | 343dd08a4ab84bdc6947239e8c514752db219c2a (patch) | |
| tree | 438f144f98a56ef6e35e4c4b670318f15c81eb31 /test/puppet | |
| parent | 1a93c822667e6990b45f843e56d8976c51517671 (diff) | |
| download | puppet-343dd08a4ab84bdc6947239e8c514752db219c2a.tar.gz puppet-343dd08a4ab84bdc6947239e8c514752db219c2a.tar.xz puppet-343dd08a4ab84bdc6947239e8c514752db219c2a.zip | |
Fixing tests so they do not chmod /dev/null to 640 (stupid tests).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@967 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/puppet')
| -rwxr-xr-x | test/puppet/utiltest.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/puppet/utiltest.rb b/test/puppet/utiltest.rb index 68b55b1ff..34278716f 100755 --- a/test/puppet/utiltest.rb +++ b/test/puppet/utiltest.rb @@ -144,15 +144,17 @@ class TestPuppetUtil < Test::Unit::TestCase end def test_withumask - File.umask(022) + oldmask = File.umask path = tempfile() + + # FIXME this fails on FreeBSD with a mode of 01777 Puppet::Util.withumask(000) do - Dir.mkdir(path, 01777) + Dir.mkdir(path, 0777) end - assert(File.stat(path).mode & 007777 == 01777) - assert_equal(022, File.umask) + assert(File.stat(path).mode & 007777 == 0777, "File has the incorrect mode") + assert_equal(oldmask, File.umask, "Umask was not reset") end unless Process.uid == 0 |
