summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-26 02:44:44 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-26 02:44:44 +0000
commit0d3db7984fd40769cbb29cde76e081cb06204710 (patch)
tree1d7ae9d3c24ab2e5a5e66e1415a4e6377d835150 /test
parenta8645a4330b91932c5658eeffa01b446e2ee657a (diff)
adding tags and path accessors
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@730 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rw-r--r--test/other/log.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/other/log.rb b/test/other/log.rb
index f4a39d467..fc92bd38e 100644
--- a/test/other/log.rb
+++ b/test/other/log.rb
@@ -1,16 +1,18 @@
if __FILE__ == $0
$:.unshift '..'
$:.unshift '../../lib'
- $puppetbase = "../../../../language/trunk/"
+ $puppetbase = "../.."
end
require 'puppet/log'
require 'puppet'
+require 'puppettest'
require 'test/unit'
# $Id$
class TestLog < Test::Unit::TestCase
+ include TestPuppet
@@logfile = File.join(Puppet[:logdir], "puppettest.log")
def teardown
@@ -120,4 +122,21 @@ class TestLog < Test::Unit::TestCase
system("rm -rf /tmp/logtesting")
Puppet[:logdest] = curdest
end
+
+ def test_logtags
+ log = nil
+ assert_nothing_raised {
+ log = Puppet::Log.new(
+ :level => :info,
+ :source => "Puppet",
+ :message => "A test message",
+ :tags => %w{this is a set of tags},
+ :path => "a path"
+ )
+ }
+
+ # This is really stupid
+ assert(log.tags)
+ assert(log.path)
+ end
end