From 96d165db913723c227191f878527b9b73b77a4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> Date: Mon, 20 May 2013 14:23:07 +0200 Subject: [PATCH] Fix quotes in /etc/aliases --- manifests/files.pp | 2 +- spec/classes/postfix_spec.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/files.pp b/manifests/files.pp index d745901..15ca815 100644 --- a/manifests/files.pp +++ b/manifests/files.pp @@ -10,7 +10,7 @@ class postfix::files { # Aliases file { '/etc/aliases': ensure => present, - content => '# file managed by puppet\n', + content => "# file managed by puppet\n", replace => false, seltype => $postfix::params::seltype, notify => Exec['newaliases'], diff --git a/spec/classes/postfix_spec.rb b/spec/classes/postfix_spec.rb index 0ee2119..9cc6229 100644 --- a/spec/classes/postfix_spec.rb +++ b/spec/classes/postfix_spec.rb @@ -5,17 +5,25 @@ describe 'postfix' do let (:facts) { { :operatingsystem => 'Debian', :osfamily => 'Debian', + :fqdn => 'fqdn.example.com', } } 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 context 'when on RedHat' do let (:facts) { { :operatingsystem => 'RedHat', :osfamily => 'RedHat', + :fqdn => 'fqdn.example.com', } } 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 -- GitLab