[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

James Turnbull james at lovedthanlost.net
Tue May 10 07:59:35 UTC 2011


The following commit has been merged in the experimental branch:
commit 7d35a479b760e382638a2efe1881b8bd94704a45
Author: James Turnbull <james at lovedthanlost.net>
Date:   Wed Oct 27 09:23:00 2010 +1100

    Fixed to #5108 - Change default of service hasstatus property to true

diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index c00f027..786a504 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -100,6 +100,8 @@ module Puppet
         looked for in the process table."
 
       newvalues(:true, :false)
+
+      defaultto :true
     end
     newparam(:name) do
       desc "The name of the service to run.  This name is used to find
diff --git a/spec/unit/type/service_spec.rb b/spec/unit/type/service_spec.rb
index 0958a69..7762867 100755
--- a/spec/unit/type/service_spec.rb
+++ b/spec/unit/type/service_spec.rb
@@ -66,6 +66,10 @@ describe Puppet::Type.type(:service), "when validating attribute values" do
     Puppet::Type.type(:service).new(:name => "yay", :hasstatus => :false)
   end
 
+  it "should specify :true as the default value of hasstatus" do
+    Puppet::Type.type(:service).new(:name => "yay")[:hasstatus].should == :true
+  end
+
   it "should support :true as a value to :hasrestart" do
     Puppet::Type.type(:service).new(:name => "yay", :hasrestart => :true)
   end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list