[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5-303-gfcfa26a

Stefan Schulte stefan.schulte at taunusstein.net
Thu Mar 17 10:46:04 UTC 2011


The following commit has been merged in the upstream branch:
commit 8b98526b0f81d559fdf85fc8aaf370f75baa5919
Author: Stefan Schulte <stefan.schulte at taunusstein.net>
Date:   Thu Dec 23 22:11:49 2010 +0100

    (#5662) Fixed tests that didnt stub key_attributes
    
    The parsedfile provider calls the method key_attributes of the resource
    class to decide what resourceparameters must be put in the
    property_hash. Tests that uses fake resources and only stub
    resource[:name] must also stub resource.class.key_attributes

diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provider/mount/parsed_spec.rb
index 7d2e8a8..3d37fc7 100755
--- a/spec/unit/provider/mount/parsed_spec.rb
+++ b/spec/unit/provider/mount/parsed_spec.rb
@@ -51,6 +51,7 @@ module ParsedMountTesting
     #hash[:provider] = @provider_class.name
 
     fakeresource = stub :type => :mount, :name => hash[:name]
+    fakeresource.class.stubs(:key_attributes).returns([:name])
     fakeresource.stubs(:[]).with(:name).returns(hash[:name])
     fakeresource.stubs(:should).with(:target).returns(nil)
 
diff --git a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
index 11e9233..2e5be16 100755
--- a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
+++ b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
@@ -104,6 +104,7 @@ describe provider_class do
   before :each do
     @resource = stub("resource", :name => "foo")
     @resource.stubs(:[]).returns "foo"
+    @resource.class.stubs(:key_attributes).returns( [:name] )
 
     @provider = provider_class.new(@resource)
     provider_class.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list