summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-07-27 17:29:20 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-07-31 16:39:38 +1000
commit4ea3f17eee236bcbc4481b08eeb5ece1e51cc929 (patch)
tree3d76c8abc4199a908c2e316b8da27b658606aeb7
parent08ff9e84de18e9b1db69c73ea3e49b90fe5fd7c0 (diff)
downloadpuppet-4ea3f17eee236bcbc4481b08eeb5ece1e51cc929.tar.gz
puppet-4ea3f17eee236bcbc4481b08eeb5ece1e51cc929.tar.xz
puppet-4ea3f17eee236bcbc4481b08eeb5ece1e51cc929.zip
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 <Markus@reality.com>
-rwxr-xr-xspec/unit/util/storage.rb4
1 files changed, 4 insertions, 0 deletions
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