Skip to content
GitLab
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
06fe7674
Commit
06fe7674
authored
Apr 18, 2017
by
treydock
Committed by
Raphaël Pinson
Apr 18, 2017
Browse files
All mydestination to be blank (#162)
parent
99793537
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/mta.pp
View file @
06fe7674
...
...
@@ -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'
;
...
...
spec/classes/postfix_mta_spec.rb
View file @
06fe7674
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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