summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/user
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-07 14:58:28 -0500
committerLuke Kanies <luke@madstop.com>2008-07-07 14:58:28 -0500
commitc751e4eef508ab3cf9466dcb45479fced5d3e4be (patch)
tree153c767f8d54931e0224cbaa10105a1fbac1005c /spec/unit/provider/user
parent81be1c5c3f85f514505e99fab5b8a2b2ae6fbec8 (diff)
downloadpuppet-c751e4eef508ab3cf9466dcb45479fced5d3e4be.tar.gz
puppet-c751e4eef508ab3cf9466dcb45479fced5d3e4be.tar.xz
puppet-c751e4eef508ab3cf9466dcb45479fced5d3e4be.zip
Fixed #1272 - ldap group names will be converted to GIDs.
Note that this only looks up ldap groups, at this point; if you want to set an ldap user's primary group to a local group, you have to specify the GID. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/provider/user')
-rwxr-xr-xspec/unit/provider/user/ldap.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/provider/user/ldap.rb b/spec/unit/provider/user/ldap.rb
index 90fc7423f..4386fa85d 100755
--- a/spec/unit/provider/user/ldap.rb
+++ b/spec/unit/provider/user/ldap.rb
@@ -24,6 +24,14 @@ describe provider_class do
provider_class.manager.rdn.should == :uid
end
+ it "should use the ldap group provider to convert group names to numbers" do
+ provider = provider_class.new(:name => "foo")
+ Puppet::Type.type(:group).provider(:ldap).expects(:name2id).with("bar").returns 10
+
+ provider.gid = 'bar'
+ provider.gid.should == 10
+ end
+
{:name => "uid",
:password => "userPassword",
:comment => "cn",