summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-05 06:53:12 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-05 06:53:12 +0000
commit668342eec1cf4d78e779d2560545e7c2f82336c1 (patch)
tree4ea487116ac9cf223f2871ec19ae632fc57e5b66
parent572648e7c6b499e2666d3bda00cd1239b8fad0a0 (diff)
downloadpuppet-668342eec1cf4d78e779d2560545e7c2f82336c1.tar.gz
puppet-668342eec1cf4d78e779d2560545e7c2f82336c1.tar.xz
puppet-668342eec1cf4d78e779d2560545e7c2f82336c1.zip
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
-rwxr-xr-xtest/other/config.rb21
1 files 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