diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 15:37:19 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-10-04 15:37:23 -0700 |
commit | 6acfdba87bdffe4afd6e00cbf3695160f7994357 (patch) | |
tree | 30d09c8a40073f6d9fa95c8bef0d4a18b462c348 /test | |
parent | 1a00c07971c4297bce1b3e0edee3b6b3399e17bb (diff) | |
parent | 6dd1930ff66f6e89ff3d7edba9cc20126d9cd9a3 (diff) | |
download | puppet-6acfdba87bdffe4afd6e00cbf3695160f7994357.tar.gz puppet-6acfdba87bdffe4afd6e00cbf3695160f7994357.tar.xz puppet-6acfdba87bdffe4afd6e00cbf3695160f7994357.zip |
Partial merge to 2.6.2rc1 : Merge commits 'd057b90' and '6dd1930' into next
This commit merges in d057b90 with the addition of commit 6dd1930 to fix
some tests that are confined to machines where rrd is installed.
Diffstat (limited to 'test')
-rwxr-xr-x | test/other/report.rb | 7 | ||||
-rwxr-xr-x | test/util/metrics.rb | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/test/other/report.rb b/test/other/report.rb index b3b41da19..8a909b41c 100755 --- a/test/other/report.rb +++ b/test/other/report.rb @@ -35,10 +35,7 @@ class TestReports < Test::Unit::TestCase config.retrieval_duration = 0.001 trans = config.apply - report = Puppet::Transaction::Report.new - trans.add_metrics_to_report(report) - - report + trans.generate_report end # Make sure we can use reports as log destinations. @@ -95,7 +92,7 @@ class TestReports < Test::Unit::TestCase assert_equal(yaml, File.read(file), "File did not get written") end - if Puppet.features.rrd? + if Puppet.features.rrd? || Puppet.features.rrd_legacy? def test_rrdgraph_report Puppet.settings.use(:main, :metrics) report = mkreport diff --git a/test/util/metrics.rb b/test/util/metrics.rb index 1fd57f2f1..82e792d0b 100755 --- a/test/util/metrics.rb +++ b/test/util/metrics.rb @@ -8,7 +8,7 @@ require 'puppettest' require 'puppet/type' class TestMetric < PuppetTest::TestCase - confine "Missing RRDtool library" => Puppet.features.rrd? + confine "Missing RRDtool library" => (Puppet.features.rrd? || Puppet.features.rrd_legacy?) include PuppetTest def gendata @@ -43,7 +43,7 @@ class TestMetric < PuppetTest::TestCase def rundata(report, time) assert_nothing_raised { gendata.each do |name, data| - report.newmetric(name, data) + report.add_metric(name, data) end report.metrics.each { |n, m| m.store(time) } } |