Paired-with: Jesse Wolfe <[email protected]>
Signed-off-by: Paul Berry <[email protected]>
---
Local-branch: ticket/next/5743
lib/puppet/report.rb | 3 ---
spec/lib/puppet/report_spec.rb | 6 ++----
spec/models/report_spec.rb | 9 ++++++---
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/lib/puppet/report.rb b/lib/puppet/report.rb
index 170bf3d..2b90958 100644
--- a/lib/puppet/report.rb
+++ b/lib/puppet/report.rb
@@ -142,9 +142,6 @@ module ReportExtensions #:nodoc:
def to_hash
hash = super
hash["resource_statuses"] = resource_statuses.values.map(&:to_hash)
- hash["kind"] = kind
- hash["puppet_version"] = puppet_version
- hash["configuration_version"] = configuration_version
hash
end
diff --git a/spec/lib/puppet/report_spec.rb b/spec/lib/puppet/report_spec.rb
index 7535310..b77b258 100644
--- a/spec/lib/puppet/report_spec.rb
+++ b/spec/lib/puppet/report_spec.rb
@@ -120,7 +120,7 @@ describe Puppet::Transaction::Report do
end
end
- describe "for a 2.6.x report" do
+ describe "for a format 1 report" do
before do
@report = YAML.load_file(Rails.root.join('spec', 'fixtures',
'reports', 'puppet26', 'report_ok_service_started_ok.yaml'))
@report.extend(ReportExtensions)
@@ -129,12 +129,10 @@ describe Puppet::Transaction::Report do
it "should produce a hash of the report" do
hash = @report.to_hash
hash.should be_a(Hash)
+ hash.keys.should =~ %w{host time logs metrics resource_statuses
report_format}
hash["report_format"].should == 1
hash["host"].should == "puppet.puppetlabs.vm"
hash["time"].should == Time.parse("2010-07-22 12:19:46.169915 -07:00")
- hash["kind"].should == "apply"
- hash["puppet_version"].should == "2.6.0"
- hash["configuration_version"].should == "1279826342"
end
it "should include the logs" do
diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb
index 4657dd8..0494883 100644
--- a/spec/models/report_spec.rb
+++ b/spec/models/report_spec.rb
@@ -233,6 +233,7 @@ HEREDOC
describe ".inspections" do
it "should include inspect reports" do
+ pending # generate_report uses YAML, which is currently being reworked.
@report = generate_report(Time.now, "file", "foo")
@report.save!
Report.inspections.should == [...@report]
@@ -394,9 +395,11 @@ HEREDOC
['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'
+ pending {
+ 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.