3 describe 'apache::fastcgi::server', :type => :define do
10 describe 'os-dependent items' do
11 context "on RedHat based systems" do
14 :osfamily => 'RedHat',
15 :operatingsystem => 'CentOS',
16 :operatingsystemrelease => '6',
19 :concat_basedir => '/dne',
20 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
24 let :facts do default_facts end
25 it { should contain_class("apache") }
26 it { should contain_class("apache::mod::fastcgi") }
27 it { should contain_file("fastcgi-pool-#{title}.conf").with(
29 :path => "/etc/httpd/conf.d/fastcgi-pool-#{title}.conf"
32 context "on Debian based systems" do
35 :osfamily => 'Debian',
36 :operatingsystem => 'Debian',
37 :operatingsystemrelease => '6',
38 :lsbdistcodename => 'squeeze',
41 :concat_basedir => '/dne',
42 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
46 let :facts do default_facts end
47 it { should contain_class("apache") }
48 it { should contain_class("apache::mod::fastcgi") }
49 it { should contain_file("fastcgi-pool-#{title}.conf").with(
51 :path => "/etc/apache2/conf.d/fastcgi-pool-#{title}.conf"
54 context "on FreeBSD systems" do
57 :osfamily => 'FreeBSD',
58 :operatingsystem => 'FreeBSD',
59 :operatingsystemrelease => '9',
62 :concat_basedir => '/dne',
63 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
67 let :facts do default_facts end
68 it { should contain_class("apache") }
69 it { should contain_class("apache::mod::fastcgi") }
70 it { should contain_file("fastcgi-pool-#{title}.conf").with(
72 :path => "/usr/local/etc/apache24/Includes/fastcgi-pool-#{title}.conf"
75 context "on Gentoo systems" do
78 :osfamily => 'Gentoo',
79 :operatingsystem => 'Gentoo',
80 :operatingsystemrelease => '3.16.1-gentoo',
81 :concat_basedir => '/dne',
84 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin',
88 let :facts do default_facts end
89 it { should contain_class("apache") }
90 it { should contain_class("apache::mod::fastcgi") }
91 it { should contain_file("fastcgi-pool-#{title}.conf").with(
93 :path => "/etc/apache2/conf.d/fastcgi-pool-#{title}.conf"
97 describe 'os-independent items' do
100 :osfamily => 'Debian',
101 :operatingsystem => 'Debian',
102 :operatingsystemrelease => '6',
103 :lsbdistcodename => 'squeeze',
106 :concat_basedir => '/dne',
107 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
111 describe ".conf content" do
114 :host => '127.0.0.1:9001',
117 :faux_path => '/var/www/php-www.fcgi',
118 :fcgi_alias => '/php-www.fcgi',
119 :file_type => 'application/x-httpd-php'
123 'FastCGIExternalServer /var/www/php-www.fcgi -idle-timeout 30 -flush -host 127.0.0.1:9001
124 Alias /php-www.fcgi /var/www/php-www.fcgi
125 Action application/x-httpd-php /php-www.fcgi
129 should contain_file("fastcgi-pool-www.conf").with_content(expected)