[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:33:38 UTC 2010


The following commit has been merged in the upstream branch:
commit d13f8ac4d5b8e4cf677c6c04fe875630216d6303
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Mon May 17 12:28:19 2010 -0700

    Fixing #3671 - --compile Catalogs are pretty-printed
    
    A simple fix for this one.
    
    This doesn't fix the general case, just the --compile case.
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb
index 2433780..44c8c02 100644
--- a/lib/puppet/application/master.rb
+++ b/lib/puppet/application/master.rb
@@ -59,7 +59,7 @@ class Puppet::Application::Master < Puppet::Application
                 raise "Could not compile catalog for %s" % options[:node] 
             end
 
-            $stdout.puts catalog.render(:pson)
+            jj catalog.to_resource
         rescue => detail
             $stderr.puts detail
             exit(30)
diff --git a/spec/unit/application/master.rb b/spec/unit/application/master.rb
index 362769e..ff0c199 100644
--- a/spec/unit/application/master.rb
+++ b/spec/unit/application/master.rb
@@ -287,6 +287,7 @@ describe Puppet::Application::Master do
                 Puppet.stubs(:[]).with(:environment)
                 Puppet.stubs(:[]).with(:manifest).returns("site.pp")
                 Puppet.stubs(:err)
+                @master.stubs(:jj)
                 @master.stubs(:exit)
                 Puppet.features.stubs(:pson?).returns true
             end
@@ -304,13 +305,15 @@ describe Puppet::Application::Master do
                 @master.compile
             end
 
-            it "should render the catalog to pson and print the output" do
-                @master.options[:node] = "foo"
+            it "should convert the catalog to a pure-resource catalog and use 'jj' to pretty-print the catalog" do
                 catalog = Puppet::Resource::Catalog.new
-                catalog.expects(:render).with(:pson).returns "mypson"
                 Puppet::Resource::Catalog.expects(:find).returns catalog
 
-                $stdout.expects(:puts).with("mypson")
+                catalog.expects(:to_resource).returns("rescat")
+
+                @master.options[:node] = "foo"
+                @master.expects(:jj).with("rescat")
+
                 @master.compile
             end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list