|
11 | 11 | end
|
12 | 12 | end
|
13 | 13 |
|
| 14 | + describe 'with ldapserver' do |
| 15 | + let(:params) {{ :ldapserver => 'ldap.example.com' }} |
| 16 | + it do |
| 17 | + should contain_class('pureftpd::config::ldap') |
| 18 | + should contain_file('/etc/pure-ftpd/pureftpd-ldap.conf') \ |
| 19 | + .with_ensure('file') \ |
| 20 | + .with_content(/^LDAPServer ldap.example.com/) |
| 21 | + end |
| 22 | + end |
| 23 | + |
14 | 24 | describe 'with ldapport' do
|
15 | 25 | let(:params) {{ :ldapport => '389' }}
|
16 | 26 | it do
|
|
153 | 163 |
|
154 | 164 | describe 'with everything' do
|
155 | 165 | let(:params) {{
|
156 |
| - :ldapauthmethod => 'PASSWORD', |
157 |
| - :ldapport => '389', |
158 |
| - :ldapbinddn => 'cn=Manager,dc=c9x,dc=org', |
159 |
| - :ldapbindpw => 'r00tPaSsw0rD', |
160 |
| - :ldapbasedn => 'cn=Users,dc=c9x,dc=org', |
161 |
| - :ldapfilter => '(&(objectClass=posixAccount)(uid=\L))', |
162 |
| - :ldaphomedir => 'homeDirectory', |
163 |
| - :ldapversion => '3', |
164 |
| - :ldapdefaultuid => '100', |
| 166 | + :ldapserver => 'ldap.example.com', |
| 167 | + :ldapauthmethod => 'PASSWORD', |
| 168 | + :ldapport => '389', |
| 169 | + :ldapbinddn => 'cn=Manager,dc=c9x,dc=org', |
| 170 | + :ldapbindpw => 'r00tPaSsw0rD', |
| 171 | + :ldapbasedn => 'cn=Users,dc=c9x,dc=org', |
| 172 | + :ldapfilter => '(&(objectClass=posixAccount)(uid=\L))', |
| 173 | + :ldaphomedir => 'homeDirectory', |
| 174 | + :ldapversion => '3', |
| 175 | + :ldapdefaultuid => '100', |
165 | 176 | :ldapforcedefaultuid => 'False',
|
166 |
| - :ldapdefaultgid => '100', |
167 |
| - :ldapdefaultgid => '100', |
| 177 | + :ldapdefaultgid => '100', |
| 178 | + :ldapdefaultgid => '100', |
168 | 179 | :ldapforcedefaultgid => 'False',
|
169 |
| - :ldapusetls => 'False', |
170 |
| - :ldapauthmethod => 'PASSWORD', |
| 180 | + :ldapusetls => 'False', |
| 181 | + :ldapauthmethod => 'PASSWORD', |
171 | 182 | }}
|
172 | 183 | it do
|
173 | 184 | should contain_class('pureftpd::config::ldap')
|
174 | 185 | should contain_file('/etc/pure-ftpd/pureftpd-ldap.conf') \
|
175 | 186 | .with_ensure('file') \
|
| 187 | + .with_content(/^LDAPServer ldap.example.com/) \ |
176 | 188 | .with_content(/^LDAPPort 389/) \
|
177 | 189 | .with_content(/^LDAPBindDN cn=Manager,dc=c9x,dc=org/) \
|
178 | 190 | .with_content(/^LDAPBindPW r00tPaSsw0rD/) \
|
|
0 commit comments