Loading manifests/hash.pp +6 −0 Changes for manifests/hash.pp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -70,6 +70,12 @@ define postfix::hash ( } exec {"generate ${name}.db": command => "postmap ${name}", path => $::path, creates => "${name}.db", # this prevents postmap from being run ! require => File[$name], } exec {"regenerate ${name}.db": command => "postmap ${name}", path => $::path, #creates => "${name}.db", # this prevents postmap from being run ! Loading spec/defines/postfix_hash_spec.rb +4 −0 Changes for spec/defines/postfix_hash_spec.rb: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when passing content' do Loading @@ -83,6 +84,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when not passing source or content' do Loading @@ -92,6 +94,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when ensuring absence' do Loading @@ -102,6 +105,7 @@ describe 'postfix::hash' do it { is_expected.to contain_file('/tmp/foo').with_ensure('absent') } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('absent') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end end end Loading Loading
manifests/hash.pp +6 −0 Changes for manifests/hash.pp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -70,6 +70,12 @@ define postfix::hash ( } exec {"generate ${name}.db": command => "postmap ${name}", path => $::path, creates => "${name}.db", # this prevents postmap from being run ! require => File[$name], } exec {"regenerate ${name}.db": command => "postmap ${name}", path => $::path, #creates => "${name}.db", # this prevents postmap from being run ! Loading
spec/defines/postfix_hash_spec.rb +4 −0 Changes for spec/defines/postfix_hash_spec.rb: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when passing content' do Loading @@ -83,6 +84,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when not passing source or content' do Loading @@ -92,6 +94,7 @@ describe 'postfix::hash' do } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('present') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end context 'when ensuring absence' do Loading @@ -102,6 +105,7 @@ describe 'postfix::hash' do it { is_expected.to contain_file('/tmp/foo').with_ensure('absent') } it { is_expected.to contain_file('/tmp/foo.db').with_ensure('absent') } it { is_expected.to contain_exec('generate /tmp/foo.db') } it { is_expected.to contain_exec('regenerate /tmp/foo.db') } end end end Loading