From 0b95a8528e554df07efe970c9ecfc34535d17c92 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 10 Jun 2010 20:31:34 -0700 Subject: Working #3139 - scheduling moved to resource harness We previously had the schedule checking code in Puppet::Type, but it's more of a transactional function, and in order to do proper auditing in the transactional area, we need the cache checking done there. Scheduling is one of the few functions that actually uses cached data currently. Signed-off-by: Luke Kanies --- spec/integration/transaction.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'spec/integration') diff --git a/spec/integration/transaction.rb b/spec/integration/transaction.rb index badf5611b..f68287432 100755 --- a/spec/integration/transaction.rb +++ b/spec/integration/transaction.rb @@ -181,8 +181,6 @@ describe Puppet::Transaction do catalog.apply FileTest.should be_exists(fname) - exec.should_not be_scheduled - # Now remove it, so it can get created again File.unlink(fname) @@ -234,4 +232,16 @@ describe Puppet::Transaction do FileTest.should_not be_exists(file1[:path]) FileTest.should_not be_exists(file2[:path]) end + + # #801 -- resources only checked in noop should be rescheduled immediately. + it "should immediately reschedule noop resources" do + Puppet::Type.type(:schedule).mkdefaultschedules + resource = Puppet::Type.type(:notify).new(:name => "mymessage", :noop => true) + catalog = Puppet::Resource::Catalog.new + catalog.add_resource resource + + trans = catalog.apply + + trans.resource_harness.should be_scheduled(resource) + end end -- cgit