summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Partlow <joshua.partlow@puppetlabs.com>2014-08-30 13:46:56 -0700
committerJosh Partlow <joshua.partlow@puppetlabs.com>2014-08-30 13:46:56 -0700
commitec3df953b8a74888a067e005528ee2db0c95703c (patch)
tree80d616026d270633acc5be9b29e9d346f843b7c0
parent807d2079c2e28e338d31f811fa4bbf3bbcda2a6a (diff)
downloadpuppet-ec3df953b8a74888a067e005528ee2db0c95703c.tar.gz
(PUP-3069) Clear configuration_file for tests
The new default_manifest integration spec is parsing actual configuration files and uncovered that our Settings do not clear the @configuration_file data when #unsafe_clear is called. This allows parsed settings to leak across specs. Specifically dropping the @configuration_file in the test helper Settings#clear_everything_for_tests, resolves this, without changing the behavior of the Settings#clear, and through it, the Puppet.clear methods.
-rw-r--r--lib/puppet/settings.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/settings.rb b/lib/puppet/settings.rb
index 8cebeb4b1..3201b125f 100644
--- a/lib/puppet/settings.rb
+++ b/lib/puppet/settings.rb
@@ -1197,6 +1197,7 @@ Generated on #{Time.now}.
# @return nil
def clear_everything_for_tests()
unsafe_clear(true, true)
+ @configuration_file = nil
@global_defaults_initialized = false
@app_defaults_initialized = false
end