3 # This function is called inside the OS specific contexts
4 def general_deflate_specs
5 it { is_expected.to contain_apache__mod("deflate") }
8 is_expected.to contain_file("deflate.conf").with_content(
9 "AddOutputFilterByType DEFLATE text/css\n"\
10 "AddOutputFilterByType DEFLATE text/html\n"\
12 "DeflateFilterNote Input instream\n"\
13 "DeflateFilterNote Ratio ratio\n"
18 describe 'apache::mod::deflate', :type => :class do
21 default_mods => false,
23 class { "apache::mod::deflate":
24 types => [ "text/html", "text/css" ],
26 "Input" => "instream",
33 context "On a Debian OS with default params" do
37 :lsbdistcodename => 'squeeze',
39 :osfamily => 'Debian',
40 :operatingsystem => 'Debian',
41 :operatingsystemrelease => '6',
42 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
43 :concat_basedir => '/dne',
48 # Load the more generic tests for this context
49 general_deflate_specs()
51 it { is_expected.to contain_file("deflate.conf").with({
53 :path => '/etc/apache2/mods-available/deflate.conf',
55 it { is_expected.to contain_file("deflate.conf symlink").with({
57 :path => '/etc/apache2/mods-enabled/deflate.conf',
61 context "on a RedHat OS with default params" do
66 :osfamily => 'RedHat',
67 :operatingsystem => 'RedHat',
68 :operatingsystemrelease => '6',
69 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
70 :concat_basedir => '/dne',
75 # Load the more generic tests for this context
76 general_deflate_specs()
78 it { is_expected.to contain_file("deflate.conf").with_path("/etc/httpd/conf.d/deflate.conf") }
81 context "On a FreeBSD OS with default params" do
86 :osfamily => 'FreeBSD',
87 :operatingsystem => 'FreeBSD',
88 :operatingsystemrelease => '9',
89 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
90 :concat_basedir => '/dne',
95 # Load the more generic tests for this context
96 general_deflate_specs()
98 it { is_expected.to contain_file("deflate.conf").with({
100 :path => '/usr/local/etc/apache24/Modules/deflate.conf',
104 context "On a Gentoo OS with default params" do
109 :osfamily => 'Gentoo',
110 :operatingsystem => 'Gentoo',
111 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin',
112 :operatingsystemrelease => '3.16.1-gentoo',
113 :concat_basedir => '/dne',
118 # Load the more generic tests for this context
119 general_deflate_specs()
121 it { is_expected.to contain_file("deflate.conf").with({
123 :path => '/etc/apache2/modules.d/deflate.conf',