Added a test to report_spec to make sure that puppet version,
configuration version, and status are properly inferred from 0.25.x
and 2.6 reports.

Paired-with: Jesse Wolfe <[email protected]>
Signed-off-by: Paul Berry <[email protected]>
---
Local-branch: ticket/next/5743
 spec/models/report_spec.rb |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb
index 1b0d52e..4657dd8 100644
--- a/spec/models/report_spec.rb
+++ b/spec/models/report_spec.rb
@@ -315,6 +315,10 @@ HEREDOC
         ['info', 'Filebucketed /tmp/puppet_test to puppet with sum 
6d0007e52f7afb7d5a0650b0ffb8a4d1', '//Node[default]/File[/tmp/puppet_test]', 
['class', 'default', 'file', 'info', 'main', 'node'], '2009-11-20 01:08:50', 
'/tmp/puppet/manifests/site.pp', 4],
         ['notice', "content changed '{md5}6d0007e52f7afb7d5a0650b0ffb8a4d1' to 
'unknown checksum'", '//Node[default]/File[/tmp/puppet_test]/content', 
['class', 'content', 'default', 'file', 'main', 'node', 'notice'], '2009-11-20 
01:08:50', '/tmp/puppet/manifests/site.pp', 4]
       ]
+
+      report.configuration_version.should == '1258679330'
+      report.puppet_version.should == '0.25.x'
+      report.status.should == 'changed'
     end
 
       it "should populate report related tables from a 2.6 yaml report" do
@@ -389,6 +393,10 @@ HEREDOC
           ['notice', 'executed successfully', 
"/Stage[main]//Node[default]/Exec[/bin/true]/returns", ['class', 'default', 
'exec', 'node', 'notice'], file, 9 ],
           ['notice', "ensure changed 'stopped' to 'running'", 
'/Stage[main]//Node[default]/Service[mysqld]/ensure', ['class', 'default', 
'mysqld', 'node', 'notice', 'service'], file, 8 ],
         ]
+
+      report.configuration_version.should == '1279826342'
+      report.puppet_version.should == '2.6.0'
+      report.status.should == 'changed'
     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.

Reply via email to