Commit f57be8bc authored by Raphaël Pinson's avatar Raphaël Pinson
Browse files

Add spec for postfix::satellite

parent 01994b91
...@@ -23,15 +23,11 @@ ...@@ -23,15 +23,11 @@
# #
class postfix::satellite { class postfix::satellite {
# If $valid_fqdn exists, use it to override $fqdn validate_re($postfix::myorigin, '^\S+$')
case $valid_fqdn {
'': { $valid_fqdn = $::fqdn }
default: { $fqdn = $valid_fqdn }
}
include postfix::mta include ::postfix::mta
postfix::virtual { "@${valid_fqdn}": postfix::virtual { "@${postfix::myorigin}":
ensure => present, ensure => present,
destination => 'root', destination => 'root',
} }
......
require 'spec_helper'
describe 'postfix::satellite' do
let (:facts) { {
:osfamily => 'Debian',
:needs_postfix_class => true,
} }
it { should include_class('postfix::mta') }
it { should contain_postfix__virtual('@foo.example.com').with(
:ensure => 'present',
:destination => 'root'
) }
end
node default { include ::augeas
include ::augeas
if $::needs_postfix_class {
include ::postfix
} }
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