From 668342eec1cf4d78e779d2560545e7c2f82336c1 Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 5 Apr 2006 06:53:12 +0000 Subject: fixing Config#mkdir test to not check gid on any BSD, since they appear to ignore egid when making directories or files git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1077 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/other/config.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/test/other/config.rb b/test/other/config.rb index a101bcd16..b89dbe82b 100755 --- a/test/other/config.rb +++ b/test/other/config.rb @@ -547,9 +547,14 @@ yay = /a/path assert_equal(mode, filemode(path), "Modes are not equal") # OS X is broken in how it chgrps files - if Process.uid == 0 and Facter["operatingsystem"].value != "Darwin" + if Process.uid == 0 assert_equal(user.uid, File.stat(path).uid, "UIDS are not equal") - assert_equal(group.gid, File.stat(path).gid, "GIDS are not equal") + + case Facter["operatingsystem"].value + when /BSD/, "Darwin": # nothing + else + assert_equal(group.gid, File.stat(path).gid, "GIDS are not equal") + end end end @@ -577,10 +582,16 @@ yay = /a/path assert_equal(mode, filemode(path), "Modes are not equal") - # OS X is broken in how it chgrps files - if Process.uid == 0 and Facter["operatingsystem"].value != "Darwin" + + # OS X and *BSD is broken in how it chgrps files + if Process.uid == 0 assert_equal(user.uid, File.stat(path).uid, "UIDS are not equal") - assert_equal(group.gid, File.stat(path).gid, "GIDS are not equal") + + case Facter["operatingsystem"].value + when /BSD/, "Darwin": # nothing + else + assert_equal(group.gid, File.stat(path).gid, "GIDS are not equal") + end end end end -- cgit