]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/spec/acceptance/itk_spec.rb
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / spec / acceptance / itk_spec.rb
1 require 'spec_helper_acceptance'
2
3 case fact('osfamily')
4 when 'Debian'
5   service_name = 'apache2'
6 when 'FreeBSD'
7   service_name = 'apache24'
8 else
9   # Not implemented yet
10   service_name = :skip
11 end
12
13 describe 'apache::mod::itk class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) or service_name.equal? :skip do
14   describe 'running puppet code' do
15     # Using puppet_apply as a helper
16     it 'should work with no errors' do
17       pp = <<-EOS
18           class { 'apache':
19             mpm_module => 'itk',
20           }
21       EOS
22
23       # Run it twice and test for idempotency
24       apply_manifest(pp, :catch_failures => true)
25       expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
26     end
27   end
28
29   describe service(service_name) do
30     it { is_expected.to be_running }
31     it { is_expected.to be_enabled }
32   end
33 end