Skip to content

Commit

Permalink
(maint) Add basic acceptance test for mod_md
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Nov 24, 2020
1 parent 3eb6671 commit d076cb8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions manifests/mod/md.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
# certificate.
#
# @see https://httpd.apache.org/docs/current/mod/mod_md.html for additional documentation.
#
# @note Unsupported platforms: CentOS: 6, 7; Debian: 8, 9; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 14, 16, 18
class apache::mod::md (
Optional[String] $md_activation_delay = undef,
Optional[Enum['on', 'off']] $md_base_server = undef,
Expand Down
6 changes: 5 additions & 1 deletion manifests/mod/watchdog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
) {
include apache

apache::mod { 'watchdog':
$module_builtin = $facts['os']['family'] in ['Debian']

unless $module_builtin {
apache::mod { 'watchdog':
}
}

if $watchdog_interval {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
default => 'mod_ldap',
},
'lookup_identity' => 'mod_lookup_identity',
'md' => 'mod_md',
'pagespeed' => 'mod-pagespeed-stable',
# NOTE: The passenger module isn't available on RH/CentOS without
# providing dependency packages provided by EPEL and passenger
Expand Down
18 changes: 18 additions & 0 deletions spec/acceptance/mod_md_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'spec_helper_acceptance'

describe 'apache::mod::md', if: mod_supported_on_platform?('apache::mod::md') do
pp = <<-MANIFEST
class { 'apache':
}
apache::vhost { 'example.com':
docroot => '/var/www/example.com',
port => 443,
ssl => true,
mdomain => true,
}
MANIFEST

it 'succeeds in configuring a virtual host using mod_md' do
apply_manifest(pp, catch_failures: true)
end
end

0 comments on commit d076cb8

Please sign in to comment.