puppet-keystone/spec/classes/keystone_ldap_spec.rb
Matt Fischer 6fd675a2fe Full support for Keystone LDAP integration
Adding full support for integrating Keystone via LDAP. Enables
support for managing all LDAP related Keystone options.

 - Add two examples of LDAP configuration, although LDAP environments
   are highly variable, these will help get everyone started
 - Modify the keystone::ldap class to support all LDAP related options
 - Check sane defaults in the keystone::ldap class to hopefully reduce mistakes
 - Add a dependency on the python-ldap package
 - Modify the LDAP test to match the new class
 - Make the default-tenant optional since some LDAP backends do not
   support this

Change-Id: Ie6879eb4816fd2b906f72cac8deb3b62bd4b2430
2014-03-25 15:50:16 -06:00

28 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'keystone::ldap' do
describe 'with basic params' do
let :params do
{
:url => 'ldap://foo',
:user => 'cn=foo,dc=example,dc=com',
:password => 'abcdefg',
:user_tree_dn => 'cn=users,dc=example,dc=com',
:user_allow_create => 'False',
:user_allow_update => 'False',
:user_allow_delete => 'False',
}
end
it { should contain_package('python-ldap') }
it 'should have basic params' do
should contain_keystone_config('ldap/url').with_value('ldap://foo')
should contain_keystone_config('ldap/user').with_value('cn=foo,dc=example,dc=com')
should contain_keystone_config('ldap/password').with_value('abcdefg').with_secret(true)
should contain_keystone_config('ldap/user_tree_dn').with_value('cn=users,dc=example,dc=com')
should contain_keystone_config('ldap/user_allow_create').with_value('False')
should contain_keystone_config('ldap/user_allow_update').with_value('False')
should contain_keystone_config('ldap/user_allow_delete').with_value('False')
end
end
end