[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
Jesse Wolfe
jes5199 at gmail.com
Wed Jul 14 10:35:26 UTC 2010
The following commit has been merged in the upstream branch:
commit e817ad1d1ac26c5299f373ec5d7e997f644baec7
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Fri Jun 25 15:38:03 2010 -0700
Fix tests broken by level-violation fix
diff --git a/lib/puppet/provider/user/useradd.rb b/lib/puppet/provider/user/useradd.rb
index 15b3b13..fc5eabc 100644
--- a/lib/puppet/provider/user/useradd.rb
+++ b/lib/puppet/provider/user/useradd.rb
@@ -60,11 +60,12 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
# Retrieve the password using the Shadow Password library
def password
- if ent = Shadow::Passwd.getspnam(@resource.name)
- return ent.sp_pwdp
- else
- return :absent
+ if Puppet.features.libshadow?
+ if ent = Shadow::Passwd.getspnam(@resource.name)
+ return ent.sp_pwdp
+ end
end
+ return :absent
end
end
diff --git a/spec/unit/type/user_spec.rb b/spec/unit/type/user_spec.rb
index 3d4d49d..590b35a 100755
--- a/spec/unit/type/user_spec.rb
+++ b/spec/unit/type/user_spec.rb
@@ -265,9 +265,7 @@ describe user do
describe "when user has roles" do
it "should autorequire roles" do
- #this is a little funky because the autorequire depends on a property with a feature
testuser = Puppet::Type.type(:user).new(:name => "testuser")
- testuser.provider.class.expects(:feature?).with(:manages_solaris_rbac).returns(true)
testuser[:roles] = "testrole"
testrole = Puppet::Type.type(:user).new(:name => "testrole")
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list