Mercurial > repos > other > Puppet
comparison modules/apache/spec/acceptance/mod_deflate_spec.rb @ 36:37675581a273 puppet-3.6
Update Puppet module for Apache (pulls in concat module)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:07:04 +0000 |
parents | |
children | 675c1cc61eaf |
comparison
equal
deleted
inserted
replaced
35:1bb941522ebf | 36:37675581a273 |
---|---|
1 require 'spec_helper_acceptance' | |
2 | |
3 describe 'apache::mod::deflate class' do | |
4 case fact('osfamily') | |
5 when 'Debian' | |
6 mod_dir = '/etc/apache2/mods-available' | |
7 service_name = 'apache2' | |
8 when 'RedHat' | |
9 mod_dir = '/etc/httpd/conf.d' | |
10 service_name = 'httpd' | |
11 when 'FreeBSD' | |
12 mod_dir = '/usr/local/etc/apache24/Modules' | |
13 service_name = 'apache24' | |
14 end | |
15 | |
16 context "default deflate config" do | |
17 it 'succeeds in puppeting deflate' do | |
18 pp= <<-EOS | |
19 class { 'apache': } | |
20 include apache::mod::deflate | |
21 EOS | |
22 apply_manifest(pp, :catch_failures => true) | |
23 end | |
24 | |
25 describe service(service_name) do | |
26 it { is_expected.to be_enabled } | |
27 it { is_expected.to be_running } | |
28 end | |
29 | |
30 describe file("#{mod_dir}/deflate.conf") do | |
31 it { is_expected.to contain "AddOutputFilterByType DEFLATE text/html text/plain text/xml" } | |
32 it { is_expected.to contain "AddOutputFilterByType DEFLATE text/css" } | |
33 it { is_expected.to contain "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript" } | |
34 it { is_expected.to contain "AddOutputFilterByType DEFLATE application/rss+xml" } | |
35 it { is_expected.to contain "DeflateFilterNote Input instream" } | |
36 it { is_expected.to contain "DeflateFilterNote Output outstream" } | |
37 it { is_expected.to contain "DeflateFilterNote Ratio ratio" } | |
38 end | |
39 end | |
40 end |