diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2010-06-10 20:31:34 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 0b95a8528e554df07efe970c9ecfc34535d17c92 (patch) | |
| tree | 42ac163a4ab9497e3fb9f676365c1b3da35c5c7d /spec/integration | |
| parent | 4627b8fe11dc14bf42e98b84121b885df73c709e (diff) | |
| download | puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.tar.gz puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.tar.xz puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.zip | |
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 <luke@puppetlabs.com>
Diffstat (limited to 'spec/integration')
| -rwxr-xr-x | spec/integration/transaction.rb | 14 |
1 files changed, 12 insertions, 2 deletions
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 |
