Paired-with: Jesse Wolfe <[email protected]>
Signed-off-by: Paul Berry <[email protected]>
---
Local-branch: ticket/next/5743
spec/lib/report_transformer_spec.rb | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/spec/lib/report_transformer_spec.rb
b/spec/lib/report_transformer_spec.rb
index 9b5b6ec..fd036a0 100644
--- a/spec/lib/report_transformer_spec.rb
+++ b/spec/lib/report_transformer_spec.rb
@@ -208,5 +208,12 @@ describe ReportTransformer do
report["metrics"]["time"]["file"].should == 3.125
report["metrics"]["time"].keys.should_not include(:file)
end
+
+ it "should not add any metrics to a failed report" do
+ @report["metrics"] = {} # a pre-version-2 report with no metrics is
considered a failure
+ report = ReportTransformer::OneToTwo.apply(@report)
+ report["metrics"].should == {}
+ report["status"].should == 'failed'
+ end
end
end
--
1.7.2
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.