diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-11-02 19:24:48 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-11-05 13:51:59 +1100 |
commit | 5b750c225ff0c646341282aa867d92dbe15509cd (patch) | |
tree | 5f4eed21d17a925d31e9f14ffcb837d002d070ef | |
parent | eca338c9fa78e1750bf70c034b1c211d8a0872d3 (diff) | |
download | puppet-5b750c225ff0c646341282aa867d92dbe15509cd.tar.gz puppet-5b750c225ff0c646341282aa867d92dbe15509cd.tar.xz puppet-5b750c225ff0c646341282aa867d92dbe15509cd.zip |
Fix #2769 - default schedule are not defined
It seems we never finalize the catalog, so the various default
resources are never created including the default schedules.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
-rw-r--r-- | lib/puppet/configurer.rb | 1 | ||||
-rwxr-xr-x | spec/unit/configurer.rb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb index afe56c77e..12726e778 100644 --- a/lib/puppet/configurer.rb +++ b/lib/puppet/configurer.rb @@ -123,6 +123,7 @@ class Puppet::Configurer # Convert a plain resource catalog into our full host catalog. def convert_catalog(result, duration) catalog = result.to_ral + catalog.finalize catalog.retrieval_duration = duration catalog.host_config = true catalog.write_class_file diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb index 0490967ba..cd5102546 100755 --- a/spec/unit/configurer.rb +++ b/spec/unit/configurer.rb @@ -183,6 +183,12 @@ describe Puppet::Configurer, "when converting the catalog" do @agent.convert_catalog(@oldcatalog, 10).should equal(@catalog) end + it "should finalize the catalog" do + @catalog.expects(:finalize) + + @agent.convert_catalog(@oldcatalog, 10) + end + it "should record the passed retrieval time with the RAL catalog" do @catalog.expects(:retrieval_duration=).with 10 |