From cdd43825cee233af478d807cddda346e9d1fe142 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Wed, 7 Jul 2010 10:30:15 -0700 Subject: [#4114] Fix failures in the unit tests The initial commit changed the name of a method (close -> close_all) and changed the way the array log destination worked before we saw that the unit tests were using it differently. --- test/lib/puppettest.rb | 2 +- test/util/log.rb | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb index 32f57f394..f94fb4cec 100755 --- a/test/lib/puppettest.rb +++ b/test/lib/puppettest.rb @@ -319,7 +319,7 @@ module PuppetTest end # reset all of the logs - Puppet::Util::Log.close + Puppet::Util::Log.close_all @logs.clear # Just in case there are processes waiting to die... diff --git a/test/util/log.rb b/test/util/log.rb index 00db10e61..b28d601e9 100755 --- a/test/util/log.rb +++ b/test/util/log.rb @@ -12,14 +12,13 @@ class TestLog < Test::Unit::TestCase def setup super @oldloglevel = Puppet::Util::Log.level - Puppet::Util::Log.close + Puppet::Util::Log.close_all end def teardown super - Puppet::Util::Log.close + Puppet::Util::Log.close_all Puppet::Util::Log.level = @oldloglevel - Puppet::Util::Log.newdestination(:console) end def getlevels @@ -57,7 +56,7 @@ class TestLog < Test::Unit::TestCase } msgs = mkmsgs(levels) assert(msgs.length == levels.length) - Puppet::Util::Log.close + Puppet::Util::Log.close_all count = 0 assert(FileTest.exists?(logfile), "Did not create logfile") -- cgit