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
08048aac
Commit
08048aac
authored
Aug 17, 2016
by
treydock
Committed by
Raphaël Pinson
Aug 17, 2016
Browse files
Fix virtual.db and transport.db creation (#135)
May address #130
parent
ba2945fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/hash.pp
View file @
08048aac
...
...
@@ -70,6 +70,12 @@ define postfix::hash (
}
exec
{
"generate
${name}
.db"
:
command
=>
"postmap
${name}
"
,
path
=>
$::path
,
creates
=>
"
${name}
.db"
,
# this prevents postmap from being run !
require
=>
File
[
$name
],
}
exec
{
"regenerate
${name}
.db"
:
command
=>
"postmap
${name}
"
,
path
=>
$::path
,
#creates => "${name}.db", # this prevents postmap from being run !
...
...
spec/defines/postfix_hash_spec.rb
View file @
08048aac
...
...
@@ -69,6 +69,7 @@ describe 'postfix::hash' do
}
it
{
is_expected
.
to
contain_file
(
'/tmp/foo.db'
).
with_ensure
(
'present'
)
}
it
{
is_expected
.
to
contain_exec
(
'generate /tmp/foo.db'
)
}
it
{
is_expected
.
to
contain_exec
(
'regenerate /tmp/foo.db'
)
}
end
context
'when passing content'
do
...
...
@@ -83,6 +84,7 @@ describe 'postfix::hash' do
}
it
{
is_expected
.
to
contain_file
(
'/tmp/foo.db'
).
with_ensure
(
'present'
)
}
it
{
is_expected
.
to
contain_exec
(
'generate /tmp/foo.db'
)
}
it
{
is_expected
.
to
contain_exec
(
'regenerate /tmp/foo.db'
)
}
end
context
'when not passing source or content'
do
...
...
@@ -92,6 +94,7 @@ describe 'postfix::hash' do
}
it
{
is_expected
.
to
contain_file
(
'/tmp/foo.db'
).
with_ensure
(
'present'
)
}
it
{
is_expected
.
to
contain_exec
(
'generate /tmp/foo.db'
)
}
it
{
is_expected
.
to
contain_exec
(
'regenerate /tmp/foo.db'
)
}
end
context
'when ensuring absence'
do
...
...
@@ -102,6 +105,7 @@ describe 'postfix::hash' do
it
{
is_expected
.
to
contain_file
(
'/tmp/foo'
).
with_ensure
(
'absent'
)
}
it
{
is_expected
.
to
contain_file
(
'/tmp/foo.db'
).
with_ensure
(
'absent'
)
}
it
{
is_expected
.
to
contain_exec
(
'generate /tmp/foo.db'
)
}
it
{
is_expected
.
to
contain_exec
(
'regenerate /tmp/foo.db'
)
}
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