Commit 06fe7674 authored by treydock's avatar treydock Committed by Raphaël Pinson
Browse files

All mydestination to be blank (#162)

parent 99793537
......@@ -46,8 +46,13 @@ class postfix::mta (
postfix::config { 'relayhost': value => $relayhost }
}
if ($mydestination == 'blank') {
postfix::config { 'mydestination': ensure => 'blank' }
} else {
postfix::config { 'mydestination': value => $mydestination }
}
postfix::config {
'mydestination': value => $mydestination;
'mynetworks': value => $mynetworks;
'virtual_alias_maps': value => 'hash:/etc/postfix/virtual';
'transport_maps': value => 'hash:/etc/postfix/transport';
......
......@@ -19,6 +19,18 @@ describe 'postfix::mta' do
it { is_expected.to contain_postfix__config('mydestination').with_value('bar') }
it { is_expected.to contain_postfix__config('mynetworks').with_value('127.0.0.1/8, [::1]/128 ![::2]/128') }
it { is_expected.to contain_postfix__config('relayhost').with_value('foo') }
context "when mydestination => 'blank'" do
let :pre_condition do
"class { 'postfix':
mydestination => 'blank',
mynetworks => '127.0.0.1/8, [::1]/128 ![::2]/128',
relayhost => 'foo',
}"
end
it { is_expected.to contain_postfix__config('mydestination').with_ensure('blank').without_value }
end
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment