Shouldn't the finalization happen in the convert method, or something  
like that?  In fact, I'm pretty sure it has to, because  
Puppet::Resource instances (which is what they are before conversion)  
don't respond to 'finish'.

On Nov 1, 2009, at 2:06 PM, Brice Figureau wrote:

>
> It seems we never finalize the catalog, so the various default
> resources are never created including the default schedules.
>
> Signed-off-by: Brice Figureau <[email protected]>
> ---
> lib/puppet/configurer.rb |    1 +
> spec/unit/configurer.rb  |    9 +++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb
> index afe56c7..820e876 100644
> --- a/lib/puppet/configurer.rb
> +++ b/lib/puppet/configurer.rb
> @@ -117,6 +117,7 @@ class Puppet::Configurer
>
>         return nil unless result
>
> +        result.finalize
>         convert_catalog(result, duration)
>     end
>
> diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb
> index 0490967..7ab6f2d 100755
> --- a/spec/unit/configurer.rb
> +++ b/spec/unit/configurer.rb
> @@ -83,6 +83,7 @@ describe Puppet::Configurer, "when retrieving a  
> catalog" do
>         @agent.stubs(:facts_for_uploading).returns({})
>
>         @catalog = Puppet::Resource::Catalog.new
> +        @catalog.stubs(:finalize)
>
>         @agent.stubs(:convert_catalog).returns @catalog
>     end
> @@ -154,6 +155,14 @@ describe Puppet::Configurer, "when retrieving a  
> catalog" do
>         @agent.retrieve_catalog.should be_nil
>     end
>
> +    it "should finalize the catalog before returning" do
> +        Puppet::Resource::Catalog.stubs(:find).returns @catalog
> +
> +        @catalog.expects(:finalize)
> +
> +        @agent.retrieve_catalog
> +    end
> +
>     it "should convert the catalog before returning" do
>         Puppet::Resource::Catalog.stubs(:find).returns @catalog
>
> -- 
> 1.6.4
>
>
> >


-- 
The difference between scientists and engineers is that when
engineers screw up, people die. -- Professor Orthlieb
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to