Add params and tests for CentOS and RedHat.
This commit is contained in:
parent
3274f6583a
commit
026b1a310c
@ -33,6 +33,16 @@ class nslcd::params {
|
||||
$config_group = 'nslcd'
|
||||
$config_mode = '0640'
|
||||
}
|
||||
RedHat: {
|
||||
$config = $default_config
|
||||
$package_name = 'nss-pam-ldapd'
|
||||
$service_name = $default_service_name
|
||||
$uid = 'nslcd'
|
||||
$gid = 'ldap'
|
||||
$config_user = 'root'
|
||||
$config_group = 'root'
|
||||
$config_mode = '0600'
|
||||
}
|
||||
default: {
|
||||
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ require 'spec_helper'
|
||||
|
||||
describe 'nslcd' do
|
||||
|
||||
{'Ubuntu' => 'Debian', 'Debian' => 'Debian'}.each do |system, family|
|
||||
{'Ubuntu' => 'Debian', 'Debian' => 'Debian', 'CentOS' => 'RedHat', 'RedHat' => 'RedHat' }.each do |system, family|
|
||||
context "when on system #{system}" do
|
||||
let :facts do
|
||||
{
|
||||
facts = {
|
||||
:osfamily => family,
|
||||
:operatingsystem => system,
|
||||
}
|
||||
let :facts do
|
||||
facts
|
||||
end
|
||||
|
||||
it { should contain_class('nslcd') }
|
||||
@ -16,10 +17,19 @@ describe 'nslcd' do
|
||||
it { should contain_class('nslcd::config') }
|
||||
it { should contain_class('nslcd::service') }
|
||||
|
||||
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
it {
|
||||
should contain_package('nslcd')
|
||||
should contain_service('nslcd')
|
||||
}
|
||||
when 'RedHat'
|
||||
it {
|
||||
should contain_package('nss-pam-ldapd')
|
||||
should contain_service('nslcd')
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user