Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ limits::manage_limits_d_dir: true
limits::purge_limits_d_dir: true

limits::limits_file: /etc/security/limits.conf
limits::manage_limits_file: false
limits::manage_limits_file: true
limits::limits_file_owner: 'root'
limits::limits_file_group: 'root'
limits::limits_file_mode: '0644'
Expand Down
18 changes: 9 additions & 9 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
end

it do
is_expected.not_to contain_file('/etc/security/limits.conf')
is_expected.to contain_file('/etc/security/limits.conf').with(
'ensure' => 'file',
'owner' => 'root',
'group' => 'root',
'mode' => '0644'
)
end
end

Expand Down Expand Up @@ -61,20 +66,15 @@
it { is_expected.not_to contain_file('/etc/security/limits.d') }
end

describe 'with manage_limits_file set to true' do
describe 'with manage_limits_file set to false' do
let :params do
{
manage_limits_file: true
manage_limits_file: false
}
end

it do
is_expected.to contain_file('/etc/security/limits.conf').with(
'ensure' => 'file',
'owner' => 'root',
'group' => 'root',
'mode' => '0644'
)
is_expected.not_to contain_file('/etc/security/limits.conf')
end
end
end
Expand Down
Loading