Loading manifests/map.pp +6 −1 Original line number Diff line number Diff line Loading @@ -80,8 +80,13 @@ define postfix::map ( } } $generate_cmd = $ensure ? { 'absent' => "rm ${path}.db", 'present' => "postmap ${path}", } exec {"generate ${name}.db": command => "postmap ${path}", command => $generate_cmd, path => $::path, #creates => "${name}.db", # this prevents postmap from being run ! refreshonly => true, Loading spec/defines/postfix_map_spec.rb +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ describe 'postfix::map' do it { is_expected.to contain_file('postfix map foo').with_ensure('absent') } it { is_expected.to contain_file('postfix map foo').without_notify } it { is_expected.to contain_file('postfix map foo.db').with_ensure('absent') } it { is_expected.to contain_exec('generate foo.db') } it { is_expected.to contain_exec('generate foo.db').with(:command => 'rm /etc/postfix/foo.db') } end context 'when using pcre type' do Loading Loading
manifests/map.pp +6 −1 Original line number Diff line number Diff line Loading @@ -80,8 +80,13 @@ define postfix::map ( } } $generate_cmd = $ensure ? { 'absent' => "rm ${path}.db", 'present' => "postmap ${path}", } exec {"generate ${name}.db": command => "postmap ${path}", command => $generate_cmd, path => $::path, #creates => "${name}.db", # this prevents postmap from being run ! refreshonly => true, Loading
spec/defines/postfix_map_spec.rb +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ describe 'postfix::map' do it { is_expected.to contain_file('postfix map foo').with_ensure('absent') } it { is_expected.to contain_file('postfix map foo').without_notify } it { is_expected.to contain_file('postfix map foo.db').with_ensure('absent') } it { is_expected.to contain_exec('generate foo.db') } it { is_expected.to contain_exec('generate foo.db').with(:command => 'rm /etc/postfix/foo.db') } end context 'when using pcre type' do Loading