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
6a43e85e
Commit
6a43e85e
authored
Aug 14, 2013
by
Todd Eddy
Browse files
Update tests.
parent
100df32a
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/config.pp
View file @
6a43e85e
...
...
@@ -34,6 +34,8 @@ define postfix::config ($value = undef, $ensure = 'present') {
"
\$
ensure must be either 'present', 'absent' or 'blank', got '
${ensure}
'"
)
if
(
$ensure
==
'present'
)
{
validate_string
(
$value
)
validate_re
(
$value
,
'^.+$'
,
'$value can not be empty if ensure = present'
)
}
if
(
!
defined
(
Class
[
'postfix'
]))
{
...
...
spec/defines/postfix_config_spec.rb
View file @
6a43e85e
...
...
@@ -11,7 +11,7 @@ describe 'postfix::config' do
it
'should fail'
do
expect
{
should
contain_augeas
(
"set postfix 'foo'"
)
}.
to
raise_error
(
Puppet
::
Error
,
/
Must pass value to Postfix::Config
/
)
}.
to
raise_error
(
Puppet
::
Error
,
/
value can not be empty
/
)
end
end
...
...
@@ -46,7 +46,7 @@ describe 'postfix::config' do
it
'should fail'
do
expect
{
should
contain_augeas
(
"set postfix 'foo'"
)
}.
to
raise_error
(
Puppet
::
Error
,
/must be either 'present'
or
'absent'/
)
}.
to
raise_error
(
Puppet
::
Error
,
/must be either 'present'
,
'absent'
or 'blank'
/
)
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