Commit 12e0ce29 authored by Erinn Looney-Triggs's avatar Erinn Looney-Triggs Committed by Raphaël Pinson
Browse files

Fix issue with multiple mynetworks.

parent 55e48b48
...@@ -35,7 +35,7 @@ class postfix::mta ( ...@@ -35,7 +35,7 @@ class postfix::mta (
'Wrong value for $relayhost') 'Wrong value for $relayhost')
validate_re($mydestination, '^\S+(?:,\s*\S+)*$', validate_re($mydestination, '^\S+(?:,\s*\S+)*$',
'Wrong value for $mydestination') 'Wrong value for $mydestination')
validate_re($mynetworks, '^\S+$', validate_re($mynetworks, '^(?:\S+?(?:(?:,\s)|(?:\s))?)*$',
'Wrong value for $mynetworks') 'Wrong value for $mynetworks')
# If direct is specified then relayhost should be blank # If direct is specified then relayhost should be blank
......
...@@ -8,12 +8,12 @@ describe 'postfix::mta' do ...@@ -8,12 +8,12 @@ describe 'postfix::mta' do
let :pre_condition do let :pre_condition do
"class { 'postfix': "class { 'postfix':
mydestination => 'bar', mydestination => 'bar',
mynetworks => 'baz', mynetworks => '127.0.0.1/8, [::1]/128 ![::2]/128',
relayhost => 'foo', relayhost => 'foo',
}" }"
end end
it { is_expected.to contain_postfix__config('mydestination').with_value('bar') } it { is_expected.to contain_postfix__config('mydestination').with_value('bar') }
it { is_expected.to contain_postfix__config('mynetworks').with_value('baz') } 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') } it { is_expected.to contain_postfix__config('relayhost').with_value('foo') }
end end
Supports Markdown
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