summaryrefslogtreecommitdiffstats
path: root/test/lib/puppettest/support
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-06 19:03:05 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-06 19:03:05 +0000
commit46d344b9daa24047b60183cc94509d306b6b562a (patch)
tree3c11eaad696ba3d6e6dd40bd7b9e7d1a4a71af85 /test/lib/puppettest/support
parent68233706a9ff05be8fa8ab3ab7198cd0918517d6 (diff)
downloadpuppet-46d344b9daa24047b60183cc94509d306b6b562a.tar.gz
puppet-46d344b9daa24047b60183cc94509d306b6b562a.tar.xz
puppet-46d344b9daa24047b60183cc94509d306b6b562a.zip
Merging the webserver_portability branch from version 2182 to version 2258.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2259 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/lib/puppettest/support')
-rw-r--r--test/lib/puppettest/support/assertions.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lib/puppettest/support/assertions.rb b/test/lib/puppettest/support/assertions.rb
index 46e4350fa..979f3fbd9 100644
--- a/test/lib/puppettest/support/assertions.rb
+++ b/test/lib/puppettest/support/assertions.rb
@@ -2,6 +2,13 @@ require 'puppettest'
require 'fileutils'
module PuppetTest
+ def assert_logged(level, regex, msg = nil)
+ # Skip verifying logs that we're not supposed to send.
+ return unless Puppet::Util::Log.sendlevel?(level)
+ r = @logs.detect { |l| l.level == level and l.message =~ regex }
+ @logs.clear
+ assert(r, msg)
+ end
def assert_uid_gid(uid, gid, filename)
flunk "Must be uid 0 to run these tests" unless Process.uid == 0