Unverified Commit 194e18dc authored by Ewoud Kohl van Wijngaarden's avatar Ewoud Kohl van Wijngaarden Committed by Tim Meusel
Browse files

Fix lens filename in postfix::canonical

Also adds an acceptance test to verify it actually works.

Fixes: 2d8880c5 ("add support for generating canonical maps")
parent 76bad494
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ define postfix::canonical (

  augeas { "Postfix canonical - ${name}":
    incl    => $_file,
    lens    => 'Postfix_Canonical.lns',
    lens    => 'postfix_canonical.lns',
    changes => $changes,
    require => Package['postfix'],
    notify  => Exec["generate ${_file}.${lookup_table_suffix}"],
+24 −0
Original line number Diff line number Diff line
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'postfix::canonical' do
  it_behaves_like 'an idempotent resource' do
    let(:manifest) do
      <<~PUPPET
        include postfix
        postfix::hash { '/etc/postfix/recipient_canonical':
          ensure => present,
        }
        postfix::config { 'canonical_alias_maps':
          value => 'hash:/etc/postfix/recipient_canonical',
        }
        postfix::canonical { 'user@example.com':
          file        => '/etc/postfix/recipient_canonical',
          ensure      => present,
          destination => 'root',
        }
      PUPPET
    end
  end
end