summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/transaction/report.rb4
-rwxr-xr-xspec/unit/transaction/report_spec.rb8
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/puppet/transaction/report.rb b/lib/puppet/transaction/report.rb
index bcdefd08d..b40c856ac 100644
--- a/lib/puppet/transaction/report.rb
+++ b/lib/puppet/transaction/report.rb
@@ -101,6 +101,10 @@ class Puppet::Transaction::Report
status
end
+ def to_yaml_properties
+ (instance_variables - ["@external_times"]).sort
+ end
+
private
def calculate_change_metrics
diff --git a/spec/unit/transaction/report_spec.rb b/spec/unit/transaction/report_spec.rb
index 1678c0940..8c4ed8afe 100755
--- a/spec/unit/transaction/report_spec.rb
+++ b/spec/unit/transaction/report_spec.rb
@@ -254,4 +254,12 @@ describe Puppet::Transaction::Report do
end
end
end
+
+ describe "when outputting yaml" do
+ it "should not include @external_times" do
+ report = Puppet::Transaction::Report.new('apply')
+ report.add_times('config_retrieval', 1.0)
+ report.to_yaml_properties.should_not include('@external_times')
+ end
+ end
end