diff --git a/pillar.example b/pillar.example index a99b0d8..7108c36 100644 --- a/pillar.example +++ b/pillar.example @@ -1,8 +1,10 @@ # vim: sts=2 ts=2 sw=2 et ai + logrotate: - lookup: - pkg: logrotate - service: crond + # default OS values can be overridden in 'lookup' dict + #lookup: + #pkg: logrotate + #service: crond default_config: weekly: True rotate: 52 diff --git a/test/integration/default/controls/logrotate.rb b/test/integration/default/controls/logrotate.rb new file mode 100644 index 0000000..a7a3d7a --- /dev/null +++ b/test/integration/default/controls/logrotate.rb @@ -0,0 +1,27 @@ +# encoding: utf-8 + +title 'Test logrotate installation' + +describe package('logrotate') do + it { should be_installed } +end + +describe file('/etc/logrotate.conf') do + it { should exist } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0644' } +end + +describe file('/etc/logrotate.d') do + it { should be_directory } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + its('mode') { should cmp '0755' } +end + +describe service('cron') do + it { should be_installed } + it { should be_enabled } + it { should be_running } +end diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml new file mode 100644 index 0000000..b062685 --- /dev/null +++ b/test/integration/default/inspec.yml @@ -0,0 +1,10 @@ +name: shorewall +title: Shorewall Profile +maintainer: Eric Veiras Galisson +copyright: Eric Veiras Galisson +copyright_email: eric AT sietch-tabr DOT com +license: MIT +summary: Logrotate Compliance Profile +version: 0.1.0 +supports: + - os-family: linux