|
@@ -7,11 +7,28 @@ describe 'openldap::server' do
|
|
|
|
|
|
it { is_expected.to compile.with_all_deps }
|
|
it { is_expected.to compile.with_all_deps }
|
|
|
|
|
|
|
|
+ context 'with provider => olc' do
|
|
|
|
+ let(:params) { { 'provider' => 'olc' } }
|
|
|
|
+
|
|
|
|
+ it { is_expected.to contain_class('openldap::utils') }
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ context 'with provider => augeas' do
|
|
|
|
+ let(:params) { { 'provider' => 'augeas' } }
|
|
|
|
+
|
|
|
|
+ it { is_expected.not_to contain_class('openldap::utils') }
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ context 'with provider => slapdconf' do
|
|
|
|
+ let(:params) { { 'provider' => 'slapdconf' } }
|
|
|
|
+
|
|
|
|
+ it { is_expected.to compile.and_raise_error(%r{provider}) }
|
|
|
|
+ end
|
|
|
|
+
|
|
case os_facts[:osfamily]
|
|
case os_facts[:osfamily]
|
|
when 'Debian'
|
|
when 'Debian'
|
|
it do
|
|
it do
|
|
is_expected.to contain_package('slapd').with_ensure('installed')
|
|
is_expected.to contain_package('slapd').with_ensure('installed')
|
|
- is_expected.to contain_package('ldap-utils').with_ensure('installed')
|
|
|
|
is_expected.to contain_file('/var/cache/debconf/slapd.preseed').with(
|
|
is_expected.to contain_file('/var/cache/debconf/slapd.preseed').with(
|
|
'ensure' => 'file',
|
|
'ensure' => 'file',
|
|
'owner' => 'root',
|
|
'owner' => 'root',
|