Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
12e0ce29
Commit
12e0ce29
authored
Nov 12, 2014
by
Erinn Looney-Triggs
Committed by
Raphaël Pinson
Mar 25, 2015
Browse files
Fix issue with multiple mynetworks.
parent
55e48b48
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/mta.pp
View file @
12e0ce29
...
...
@@ -35,7 +35,7 @@ class postfix::mta (
'Wrong value for $relayhost'
)
validate_re
(
$mydestination
,
'^\S+(?:,\s*\S+)*$'
,
'Wrong value for $mydestination'
)
validate_re
(
$mynetworks
,
'^
\S+
$'
,
validate_re
(
$mynetworks
,
'^
(?:\S+?(?:(?:,\s)|(?:\s))?)*
$'
,
'Wrong value for $mynetworks'
)
# If direct is specified then relayhost should be blank
...
...
spec/classes/postfix_mta_spec.rb
View file @
12e0ce29
...
...
@@ -8,12 +8,12 @@ describe 'postfix::mta' do
let
:pre_condition
do
"class { 'postfix':
mydestination => 'bar',
mynetworks => '
baz
',
mynetworks => '
127.0.0.1/8, [::1]/128 ![::2]/128
',
relayhost => 'foo',
}"
end
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'
)
}
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment