Skip to content

Commit d076cb8

Browse files
committed
(maint) Add basic acceptance test for mod_md
1 parent 3eb6671 commit d076cb8

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

manifests/mod/md.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
# certificate.
9090
#
9191
# @see https://httpd.apache.org/docs/current/mod/mod_md.html for additional documentation.
92+
#
93+
# @note Unsupported platforms: CentOS: 6, 7; Debian: 8, 9; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 14, 16, 18
9294
class apache::mod::md (
9395
Optional[String] $md_activation_delay = undef,
9496
Optional[Enum['on', 'off']] $md_base_server = undef,

manifests/mod/watchdog.pp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
) {
1111
include apache
1212

13-
apache::mod { 'watchdog':
13+
$module_builtin = $facts['os']['family'] in ['Debian']
14+
15+
unless $module_builtin {
16+
apache::mod { 'watchdog':
17+
}
1418
}
1519

1620
if $watchdog_interval {

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
default => 'mod_ldap',
232232
},
233233
'lookup_identity' => 'mod_lookup_identity',
234+
'md' => 'mod_md',
234235
'pagespeed' => 'mod-pagespeed-stable',
235236
# NOTE: The passenger module isn't available on RH/CentOS without
236237
# providing dependency packages provided by EPEL and passenger

spec/acceptance/mod_md_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require 'spec_helper_acceptance'
2+
3+
describe 'apache::mod::md', if: mod_supported_on_platform?('apache::mod::md') do
4+
pp = <<-MANIFEST
5+
class { 'apache':
6+
}
7+
apache::vhost { 'example.com':
8+
docroot => '/var/www/example.com',
9+
port => 443,
10+
ssl => true,
11+
mdomain => true,
12+
}
13+
MANIFEST
14+
15+
it 'succeeds in configuring a virtual host using mod_md' do
16+
apply_manifest(pp, catch_failures: true)
17+
end
18+
end

0 commit comments

Comments
 (0)