Commit c0930652 authored by Nick Lewis's avatar Nick Lewis

Stringify configuration version in report

This is required to be a string instead of a datetime now, but the
default from Puppet is for it to be a number. Now we will ensure it's
always a string, no matter what.
parent 3f469c3e
......@@ -36,7 +36,7 @@ Puppet::Reports.register_report(:puppetdb) do
"certname" => host,
"puppet-version" => @puppet_version,
"report-format" => @report_format,
"configuration-version" => configuration_version,
"configuration-version" => configuration_version.to_s,
"start-time" => Puppet::Util::Puppetdb.to_wire_time(time),
"end-time" => Puppet::Util::Puppetdb.to_wire_time(time + run_duration),
"resource-events" =>
......
......@@ -12,7 +12,7 @@ describe processor do
subject {
s = Puppet::Transaction::Report.new("foo").extend(processor)
s.configuration_version = "123456789"
s.configuration_version = 123456789
s
}
......@@ -94,7 +94,7 @@ describe processor do
# TODO: change these two to use accessors as soon as we get up to puppet 3.0
result["puppet-version"].should == subject.instance_variable_get(:@puppet_version)
result["report-format"].should == subject.instance_variable_get(:@report_format)
result["configuration-version"].should == subject.configuration_version
result["configuration-version"].should == subject.configuration_version.to_s
result["resource-events"].should == []
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment