Skip to content
Snippets Groups Projects
Commit 96d165db authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Fix quotes in /etc/aliases

parent cd0090f0
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ class postfix::files { ...@@ -10,7 +10,7 @@ class postfix::files {
# Aliases # Aliases
file { '/etc/aliases': file { '/etc/aliases':
ensure => present, ensure => present,
content => '# file managed by puppet\n', content => "# file managed by puppet\n",
replace => false, replace => false,
seltype => $postfix::params::seltype, seltype => $postfix::params::seltype,
notify => Exec['newaliases'], notify => Exec['newaliases'],
......
...@@ -5,17 +5,25 @@ describe 'postfix' do ...@@ -5,17 +5,25 @@ describe 'postfix' do
let (:facts) { { let (:facts) { {
:operatingsystem => 'Debian', :operatingsystem => 'Debian',
:osfamily => 'Debian', :osfamily => 'Debian',
:fqdn => 'fqdn.example.com',
} } } }
it { should contain_package('postfix') } it { should contain_package('postfix') }
it { should contain_package('mailx') }
it { should contain_file('/etc/mailname').with_content("fqdn.example.com\n") }
it { should contain_file('/etc/aliases').with_content("# file managed by puppet\n") }
end end
context 'when on RedHat' do context 'when on RedHat' do
let (:facts) { { let (:facts) { {
:operatingsystem => 'RedHat', :operatingsystem => 'RedHat',
:osfamily => 'RedHat', :osfamily => 'RedHat',
:fqdn => 'fqdn.example.com',
} } } }
it { should contain_package('postfix') } it { should contain_package('postfix') }
it { should contain_package('mailx') }
it { should contain_file('/etc/mailname').with_content("fqdn.example.com\n") }
it { should contain_file('/etc/aliases').with_content("# file managed by puppet\n") }
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment