summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-06-29 19:44:25 +0000
committerLuke Kanies <luke@madstop.com>2005-06-29 19:44:25 +0000
commitbb7e2833f0ea9c97d55fcb76e5811c035161256f (patch)
tree560129341856ab4a29d9c3c9a40529627de521e4 /test
parentc16ca53ea8d62ffb8e02afddb8ae93cfbae800b2 (diff)
fixing debugging to severely reduce output but allow it when debugging a specific service
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@319 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rw-r--r--test/other/tc_log.rb1
-rw-r--r--test/other/tc_metrics.rb2
-rw-r--r--test/other/tc_selector.rb4
-rw-r--r--test/other/tc_state.rb2
-rw-r--r--test/other/tc_transactions.rb2
-rw-r--r--test/types/tc_basic.rb2
-rw-r--r--test/types/tc_file.rb2
-rw-r--r--test/types/tc_filetype.rb2
-rw-r--r--test/types/tc_query.rb2
-rw-r--r--test/types/tc_service.rb2
-rw-r--r--test/types/tc_symlink.rb2
11 files changed, 12 insertions, 11 deletions
diff --git a/test/other/tc_log.rb b/test/other/tc_log.rb
index edfb44f8e..b00024636 100644
--- a/test/other/tc_log.rb
+++ b/test/other/tc_log.rb
@@ -16,6 +16,7 @@ class TestLog < Test::Unit::TestCase
def teardown
system("rm -f %s" % @@logfile)
Puppet::Log.destination(:console)
+ Puppet[:loglevel] = :notice
end
def getlevels
diff --git a/test/other/tc_metrics.rb b/test/other/tc_metrics.rb
index 5c0f33fd0..1dd73a305 100644
--- a/test/other/tc_metrics.rb
+++ b/test/other/tc_metrics.rb
@@ -48,7 +48,7 @@ class TestMetric < Test::Unit::TestCase
def setup
Puppet[:rrddir] = File.join(Dir.getwd,"rrdtests")
Puppet[:rrdgraph] = true
- Puppet[:loglevel] = :debug
+ Puppet[:loglevel] = :debug if __FILE__ == $0
end
def teardown
diff --git a/test/other/tc_selector.rb b/test/other/tc_selector.rb
index 1f01ea87a..7c8ffbd68 100644
--- a/test/other/tc_selector.rb
+++ b/test/other/tc_selector.rb
@@ -13,11 +13,11 @@ class TestSelector < Test::Unit::TestCase
def setup
@os = Puppet::Fact["operatingsystem"]
@hostname = Puppet::Fact["hostname"]
+
+ Puppet[:loglevel] = :debug if __FILE__ == $0
end
def test_values
- Puppet[:debug] = 1
-
selector = nil
assert_nothing_raised() {
selector = Puppet::Selector.new { |select|
diff --git a/test/other/tc_state.rb b/test/other/tc_state.rb
index bd8d1c24e..5ab5a7cb3 100644
--- a/test/other/tc_state.rb
+++ b/test/other/tc_state.rb
@@ -11,7 +11,7 @@ require 'test/unit'
class TestStorage < Test::Unit::TestCase
def setup
- Puppet[:debug] = true
+ Puppet[:loglevel] = :debug if __FILE__ == $0
Puppet[:statefile] = "/var/tmp/puppetteststate"
end
diff --git a/test/other/tc_transactions.rb b/test/other/tc_transactions.rb
index d5f2c5da7..ec1b9f277 100644
--- a/test/other/tc_transactions.rb
+++ b/test/other/tc_transactions.rb
@@ -11,7 +11,7 @@ require 'test/unit'
class TestTransactions < Test::Unit::TestCase
def setup
- Puppet[:debug] = true
+ Puppet[:loglevel] = :debug if __FILE__ == $0
@groups = %x{groups}.chomp.split(/ /)
unless @groups.length > 1
diff --git a/test/types/tc_basic.rb b/test/types/tc_basic.rb
index 0732624e5..a62bc4aba 100644
--- a/test/types/tc_basic.rb
+++ b/test/types/tc_basic.rb
@@ -18,7 +18,7 @@ class TestBasic < Test::Unit::TestCase
@configfile = nil
@sleeper = nil
- Puppet[:debug] = 1
+ Puppet[:loglevel] = :debug if __FILE__ == $0
assert_nothing_raised() {
@component = Puppet::Component.new(:name => "yaytest")
diff --git a/test/types/tc_file.rb b/test/types/tc_file.rb
index 9f7214e99..e40060c01 100644
--- a/test/types/tc_file.rb
+++ b/test/types/tc_file.rb
@@ -16,7 +16,7 @@ class TestFile < Test::Unit::TestCase
def setup
@file = nil
@path = File.join($puppetbase,"examples/root/etc/configfile")
- Puppet[:debug] = 1
+ Puppet[:loglevel] = :debug if __FILE__ == $0
Puppet[:statefile] = "/var/tmp/puppetstate"
assert_nothing_raised() {
@file = Puppet::Type::File.new(
diff --git a/test/types/tc_filetype.rb b/test/types/tc_filetype.rb
index fcab4b6f8..521a4bbb5 100644
--- a/test/types/tc_filetype.rb
+++ b/test/types/tc_filetype.rb
@@ -14,7 +14,7 @@ require 'test/unit'
#class TestFileType < Test::Unit::TestCase
class TestFileType
def disabled_setup
- Puppet[:debug] = 1
+ Puppet[:loglevel] = :debug if __FILE__ == $0
@passwdtype = Puppet::Type::FileType["passwd"]
if @passwdtype.nil?
diff --git a/test/types/tc_query.rb b/test/types/tc_query.rb
index b00bf549b..9bb2dd72e 100644
--- a/test/types/tc_query.rb
+++ b/test/types/tc_query.rb
@@ -11,7 +11,7 @@ require 'test/unit'
class TestQuery < Test::Unit::TestCase
def setup
- Puppet[:debug] = true
+ Puppet[:loglevel] = :debug if __FILE__ == $0
end
def teardown
diff --git a/test/types/tc_service.rb b/test/types/tc_service.rb
index 96a14dbee..bda052f30 100644
--- a/test/types/tc_service.rb
+++ b/test/types/tc_service.rb
@@ -18,7 +18,7 @@ class TestService < Test::Unit::TestCase
script = File.join($puppetbase,"examples/root/etc/init.d/sleeper")
@status = script + " status"
- Puppet[:debug] = 1
+ Puppet[:loglevel] = :debug if __FILE__ == $0
assert_nothing_raised() {
unless Puppet::Type::Service.has_key?("sleeper")
Puppet::Type::Service.new(
diff --git a/test/types/tc_symlink.rb b/test/types/tc_symlink.rb
index 36a1ed28f..f322c1167 100644
--- a/test/types/tc_symlink.rb
+++ b/test/types/tc_symlink.rb
@@ -18,7 +18,7 @@ class TestSymlink < Test::Unit::TestCase
@path = File.join($puppetbase,"examples/root/etc/symlink")
Kernel.system("rm -f %s" % @path)
- Puppet[:debug] = 1
+ Puppet[:loglevel] = :debug if __FILE__ == $0
assert_nothing_raised() {
unless Puppet::Type::Symlink.has_key?(@path)
Puppet::Type::Symlink.new(