fix idempotency for empty environment #54
Annotations
3 errors
spec/unit/provider/cron/parsed_spec.rb#L207
Puppet::Type::Cron::ProviderCrontab.instances on linux is able to create records from not-managed records
Failure/Error: expect(parameters[0][:environment]).to eq(:absent)
expected: :absent
got: []
(compared using ==)
Diff:
@@ -1 +1 @@
-:absent
+[]
|
spec/unit/provider/cron/parsed_spec.rb#L243
Puppet::Type::Cron::ProviderCrontab.instances on linux is able to parse puppet managed cronjobs
Failure/Error:
expect(described_class.instances.map do |p|
h = { name: p.get(:name) }
Puppet::Type.type(:cron).validproperties.each do |property|
h[property] = p.get(property)
end
h
end).to eq([
{
name: 'real_job',
minute: :absent,
expected: [{:command=>"/bin/true", :ensure=>:present, :environment=>:absent, :hour=>:absent, :minute=>:absent, ...nt, :name=>"complex_job", :special=>"reboot", :target=>"foobar", :user=>:absent, :weekday=>:absent}]
got: [{:command=>"/bin/true", :ensure=>:present, :environment=>[], :hour=>:absent, :minute=>:absent, :mont...nt, :name=>"complex_job", :special=>"reboot", :target=>"foobar", :user=>:absent, :weekday=>:absent}]
(compared using ==)
Diff:
@@ -1,6 +1,6 @@
[{:command=>"/bin/true",
:ensure=>:present,
- :environment=>:absent,
+ :environment=>[],
:hour=>:absent,
:minute=>:absent,
:month=>:absent,
|
|
This job failed
Loading