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 @@
#
class postfix::satellite {
# If $valid_fqdn exists, use it to override $fqdn
case $valid_fqdn {
'': { $valid_fqdn = $::fqdn }
default: { $fqdn = $valid_fqdn }
}
validate_re($postfix::myorigin, '^\S+$')
include postfix::mta
include ::postfix::mta
postfix::virtual { "@${valid_fqdn}":
postfix::virtual { "@${postfix::myorigin}":
ensure => present,
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