Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "VoxBox",
"image": "ghcr.io/voxpupuli/voxbox:latest"
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '10.5.0'
modulesync_config_version: '10.6.0'
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 13.0', :require => false
gem 'voxpupuli-test', '~> 14.0', :require => false
gem 'puppet_metadata', '~> 6.0', :require => false
end

Expand All @@ -19,7 +19,7 @@ group :system_tests do
end

group :release do
gem 'voxpupuli-release', '~> 5.0', :require => false
gem 'voxpupuli-release', '~> 5.3', :require => false
end

gem 'rake', :require => false
Expand Down
66 changes: 33 additions & 33 deletions spec/classes/postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/etc/init.d/postfix reload'
restart: '/etc/init.d/postfix reload',
)
}
end
Expand All @@ -103,41 +103,41 @@
it { is_expected.to contain_augeas("manage postfix 'mailq_path'") }
it { is_expected.to contain_alternatives('mta') }

context 'when on release 8', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '8') do # rubocop:disable RSpec/MultipleMemoizedHelpers
context 'when on release 8', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '8' do # rubocop:disable RSpec/MultipleMemoizedHelpers
it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") }

it {
is_expected.to contain_service('postfix').with(
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/bin/systemctl reload postfix'
restart: '/bin/systemctl reload postfix',
)
}
end

context 'when on release 7', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '7') do # rubocop:disable RSpec/MultipleMemoizedHelpers
context 'when on release 7', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '7' do # rubocop:disable RSpec/MultipleMemoizedHelpers
it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") }

it {
is_expected.to contain_service('postfix').with(
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/bin/systemctl reload postfix'
restart: '/bin/systemctl reload postfix',
)
}
end

context 'when on release 6', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '6') do # rubocop:disable RSpec/MultipleMemoizedHelpers
context 'when on release 6', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '6' do # rubocop:disable RSpec/MultipleMemoizedHelpers
it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") }

it {
is_expected.to contain_service('postfix').with(
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/etc/init.d/postfix reload'
restart: '/etc/init.d/postfix reload',
)
}
end
Expand All @@ -151,7 +151,7 @@
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/bin/systemctl reload postfix'
restart: '/bin/systemctl reload postfix',
)
}
end
Expand Down Expand Up @@ -207,23 +207,23 @@

it {
is_expected.to contain_file(postfix_master_cf_path).without('seltype').with_content(
%r{smtp inet n - - - - smtpd}
%r{smtp inet n - - - - smtpd},
).with_content(
%r{amavis unix}
%r{amavis unix},
).with_content(
%r{dovecot.*\n.* user=bar:bar }
%r{dovecot.*\n.* user=bar:bar },
).with_content(
%r{schleuder}
%r{schleuder},
).with_content(
%r{sympa}
%r{sympa},
).with_content(
%r{user=bar}
%r{user=bar},
).with_content(
%r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:}
%r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:},
).with_content(
%r{^smtps inet n}
%r{^smtps inet n},
).with_content(
%r{^submission inet n}
%r{^submission inet n},
)
}

Expand All @@ -234,7 +234,7 @@
ensure: 'running',
enable: 'true',
hasstatus: 'true',
restart: '/etc/init.d/postfix reload'
restart: '/etc/init.d/postfix reload',
)
}

Expand All @@ -261,7 +261,7 @@
ldap: true,
ldap_base: 'cn=Users,dc=example,dc=com',
ldap_host: 'ldaps://ldap.example.com:636 ldap://ldap2.example.com',
ldap_options: 'start_tls = yes'
ldap_options: 'start_tls = yes',
}
end

Expand Down Expand Up @@ -421,9 +421,9 @@

it 'updates master.cf with the specified flags to smtp' do
is_expected.to contain_file(postfix_master_cf_path).with_content(
%r{smtp inet n - - - - smtpd}
%r{smtp inet n - - - - smtpd},
).with_content(
%r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:}
%r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:},
)
end
end
Expand Down Expand Up @@ -473,8 +473,8 @@
{
masquerade_classes: ['envelope_sender'],
masquerade_domains: ['host.example.com', 'example.com'],
masquerade_exceptions: ['root']
}
masquerade_exceptions: ['root'],
},
)
end

Expand Down Expand Up @@ -510,7 +510,7 @@
{
mta: true,
mydestination: 'example.org, example.com, localhost.localdomain, localhost',
relayhost: '2.3.4.5'
relayhost: '2.3.4.5',
}
end

Expand All @@ -526,7 +526,7 @@
mta: true,
mydestination: '1.2.3.4',
relayhost: 'direct',
mynetworks: '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24'
mynetworks: '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24',
}
end

Expand All @@ -548,7 +548,7 @@
let(:params) do
{
mta: true,
relayhost: 'relay.example.org'
relayhost: 'relay.example.org',
}
end

Expand Down Expand Up @@ -612,7 +612,7 @@

it 'updates master.cf to listen to all addresses' do
is_expected.to contain_file(postfix_master_cf_path).with_content(
%r{smtp inet n - n - - smtpd}
%r{smtp inet n - n - - smtpd},
)
end
end
Expand All @@ -622,9 +622,9 @@

it 'updates master.cf with multiple smtp listeners' do
is_expected.to contain_file(postfix_master_cf_path).with_content(
%r{192.168.0.123:smtp inet n - n - - smtpd}
%r{192.168.0.123:smtp inet n - n - - smtpd},
).with_content(
%r{10.0.0.123:smtp inet n - n - - smtpd}
%r{10.0.0.123:smtp inet n - n - - smtpd},
)
end
end
Expand All @@ -634,9 +634,9 @@

it 'updates master.cf with multiple smtp listeners' do
is_expected.to contain_file(postfix_master_cf_path).with_content(
%r{192.168.0.123:smtp inet n - n - - smtpd}
%r{192.168.0.123:smtp inet n - n - - smtpd},
).with_content(
%r{10.0.0.123:smtp inet n - n - - smtpd}
%r{10.0.0.123:smtp inet n - n - - smtpd},
)
end
end
Expand Down Expand Up @@ -812,7 +812,7 @@
'search_base' => 'dc=example, dc=com',
'query_filter' => 'mail=%s',
'result_attribute' => 'uid',
}
},
)
is_expected.to contain_file('postfix conffile ldapoptions.cf').with_ensure('present')
end
Expand All @@ -833,7 +833,7 @@
it 'creates the map resource' do
is_expected.to contain_postfix__map('a_map').with(
'type' => 'regexp',
'content' => 'abc xyz'
'content' => 'abc xyz',
)
is_expected.to contain_exec('generate a_map.db')
is_expected.to contain_file('postfix map a_map')
Expand Down
8 changes: 4 additions & 4 deletions spec/defines/postfix_conffile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
it {
is_expected.to contain_file('postfix conffile foo').with(
ensure: 'present',
source: 'puppet:///modules/postfix/bar'
source: 'puppet:///modules/postfix/bar',
).without(:content)
}
end
Expand All @@ -69,7 +69,7 @@
it {
is_expected.to contain_file('postfix conffile foo').with(
ensure: 'present',
content: 'bar'
content: 'bar',
).without(:source)
}
end
Expand Down Expand Up @@ -126,7 +126,7 @@
it {
is_expected.to contain_file('postfix conffile foo').with(
mode: '0644',
content: 'bar'
content: 'bar',
)
}
end
Expand All @@ -142,7 +142,7 @@
it {
is_expected.to contain_file('postfix conffile foo').with(
path: '/tmp/foo',
content: 'bar'
content: 'bar',
)
}
end
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/postfix_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
is_expected.to contain_augeas("manage postfix 'foo'").with(
incl: postfix_main_cf_path,
lens: 'Postfix_Main.lns',
changes: "set foo 'bar'"
changes: "set foo 'bar'",
)
}
end
Expand All @@ -73,7 +73,7 @@
is_expected.to contain_augeas("manage postfix 'foo'").with(
incl: postfix_main_cf_path,
lens: 'Postfix_Main.lns',
changes: 'rm foo'
changes: 'rm foo',
)
}
end
Expand All @@ -90,7 +90,7 @@
is_expected.to contain_augeas("manage postfix 'foo'").with(
incl: postfix_main_cf_path,
lens: 'Postfix_Main.lns',
changes: 'clear foo'
changes: 'clear foo',
)
}
end
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/postfix_hash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
it {
is_expected.to contain_file('postfix map /tmp/foo').with(
ensure: 'present',
source: '/tmp/bar'
source: '/tmp/bar',
).without(:content)
}

Expand All @@ -90,7 +90,7 @@
it {
is_expected.to contain_file('postfix map /tmp/foo').with(
ensure: 'present',
content: 'bar'
content: 'bar',
).without(:source)
}

Expand All @@ -107,7 +107,7 @@
context 'when not passing source or content' do
it {
is_expected.to contain_file('postfix map /tmp/foo').with(
ensure: 'present'
ensure: 'present',
).without(:source).without(:content)
}

Expand Down
6 changes: 3 additions & 3 deletions spec/defines/postfix_map_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
it {
is_expected.to contain_file('postfix map foo').with(
ensure: 'present',
source: '/tmp/bar'
source: '/tmp/bar',
).without(:content)
}

Expand All @@ -79,7 +79,7 @@
it {
is_expected.to contain_file('postfix map foo').with(
ensure: 'present',
content: 'bar'
content: 'bar',
).without(:source)
}

Expand All @@ -90,7 +90,7 @@
context 'when not passing source or content' do
it {
is_expected.to contain_file('postfix map foo').with(
ensure: 'present'
ensure: 'present',
).without(:source).without(:content)
}

Expand Down
Loading