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

Markus Roberts Markus at reality.com
Wed Jul 14 10:35:46 UTC 2010


The following commit has been merged in the upstream branch:
commit 0aae5a71a8e3b38cd8d7041f5c40091887c924a8
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Mon Jun 28 15:27:44 2010 -0700

    maint: Fixing tests that fail when run as root
    
    Commit ae520057280c2454bc44c64ac1e6686bf2eb086d introduced some code
    that used 'asuser' which does nothing when not run as root, but in these
    tests tries to run as a non-existent user.  Stubbing out the asuser
    method to just yield prevents test failures when running as root.

diff --git a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
index f8613e3..e60ba27 100755
--- a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
+++ b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
@@ -44,6 +44,7 @@ describe provider_class do
         @provider.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam)
         File.stubs(:chown)
         File.stubs(:chmod)
+        Puppet::Util::SUIDManager.stubs(:asuser).yields
         key.flush
         @provider.target_object(@keyfile).read
     end
@@ -99,6 +100,7 @@ describe provider_class do
 
         @provider = provider_class.new(@resource)
         provider_class.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam)
+        Puppet::Util::SUIDManager.stubs(:asuser).yields
     end
 
     describe "when flushing" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list