Skip to content

Commit

Permalink
Fix lens filename in postfix::canonical
Browse files Browse the repository at this point in the history
Also adds an acceptance test to verify it actually works.

Fixes: 2d8880c ("add support for generating canonical maps")
  • Loading branch information
ekohl authored and bastelfreak committed Nov 21, 2023
1 parent 76bad49 commit 194e18d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/canonical.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

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}"],
Expand Down
24 changes: 24 additions & 0 deletions spec/acceptance/canonical_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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 { '[email protected]':
file => '/etc/postfix/recipient_canonical',
ensure => present,
destination => 'root',
}
PUPPET
end
end
end

0 comments on commit 194e18d

Please sign in to comment.