From 4ea3f17eee236bcbc4481b08eeb5ece1e51cc929 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Mon, 27 Jul 2009 17:29:20 -0700 Subject: Minimal patch to fix #2290 (/tmp permissions) This patch rectifies the specified problem by resetting the permissions to 1777 after the offending tests have run. I am providing it for testing but suspect there may be a deeper bug hiding behind this one--specifically, it isn't clear to me that an analogous problem could not occur in production use (which this patch to the spec would not fix). This patch also fixes the specific test isolation failure which was causing ticket #2290; if spec/unit/util/storage.rb was run by "rake spec" before spec/integration/network/server/webrick.rb without any intervening tests which did a Puppet.settings.clear, the the webrick test would change the permissions on /tmp. Signed-off-by: Markus Roberts --- spec/unit/util/storage.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/unit/util/storage.rb b/spec/unit/util/storage.rb index a7dea4001..c78614534 100755 --- a/spec/unit/util/storage.rb +++ b/spec/unit/util/storage.rb @@ -12,6 +12,10 @@ describe Puppet::Util::Storage do Puppet[:statedir] = Dir.tmpdir() end + after(:all) do + Puppet.settings.clear + end + before(:each) do Puppet::Util::Storage.clear() end -- cgit