]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/spec/acceptance/mod_proxy_html_spec.rb
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / spec / acceptance / mod_proxy_html_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'apache::mod::proxy_html class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
4   case fact('osfamily')
5   when 'Debian'
6     service_name = 'apache2'
7   when 'RedHat'
8     service_name = 'httpd'
9   when 'FreeBSD'
10     service_name = 'apache24'
11   when 'Gentoo'
12     service_name = 'apache2'
13   end
14
15   context "default proxy_html config" do
16     if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/
17       it 'adds epel' do
18         pp = "class { 'epel': }"
19         apply_manifest(pp, :catch_failures => true)
20       end
21     end
22
23     it 'succeeds in puppeting proxy_html' do
24       pp= <<-EOS
25         class { 'apache': }
26         class { 'apache::mod::proxy': }
27         class { 'apache::mod::proxy_http': }
28         # mod_proxy_html doesn't exist in RHEL5
29         if $::osfamily == 'RedHat' and $::operatingsystemmajrelease != '5' {
30           class { 'apache::mod::proxy_html': }
31         }
32       EOS
33       apply_manifest(pp, :catch_failures => true)
34     end
35
36     describe service(service_name) do
37       it { is_expected.to be_enabled }
38       it { is_expected.to be_running }
39     end
40   end
41 end