3 describe 'apache::mod::fcgid', :type => :class do
8 context "on a Debian OS" do
11 :osfamily => 'Debian',
12 :operatingsystemrelease => '6',
13 :operatingsystemmajrelease => '6',
14 :concat_basedir => '/dne',
15 :lsbdistcodename => 'squeeze',
16 :operatingsystem => 'Debian',
19 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
23 it { is_expected.to contain_class("apache::params") }
24 it { is_expected.to contain_apache__mod('fcgid') }
25 it { is_expected.to contain_package("libapache2-mod-fcgid") }
28 context "on a RedHat OS" do
31 :osfamily => 'RedHat',
32 :operatingsystemrelease => '6',
33 :operatingsystemmajrelease => '6',
34 :concat_basedir => '/dne',
35 :operatingsystem => 'RedHat',
38 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
43 describe 'without parameters' do
44 it { is_expected.to contain_class("apache::params") }
45 it { is_expected.to contain_apache__mod('fcgid') }
46 it { is_expected.to contain_package("mod_fcgid") }
49 describe 'with parameters' do
52 'FcgidIPCDir' => '/var/run/fcgidsock',
53 'SharememPath' => '/var/run/fcgid_shm',
54 'FcgidMinProcessesPerClass' => '0',
55 'AddHandler' => 'fcgid-script .fcgi',
59 it 'should contain the correct config' do
60 content = catalogue.resource('file', 'fcgid.conf').send(:parameters)[:content]
61 expect(content.split("\n").reject { |c| c =~ /(^#|^$)/ }).to eq([
62 '<IfModule mod_fcgid.c>',
63 ' AddHandler fcgid-script .fcgi',
64 ' FcgidIPCDir /var/run/fcgidsock',
65 ' FcgidMinProcessesPerClass 0',
66 ' SharememPath /var/run/fcgid_shm',
76 :osfamily => 'RedHat',
77 :operatingsystemrelease => '7',
78 :operatingsystemmajrelease => '7',
79 :concat_basedir => '/dne',
80 :operatingsystem => 'RedHat',
83 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
88 describe 'without parameters' do
89 it { is_expected.to contain_class("apache::params") }
90 it { is_expected.to contain_apache__mod('fcgid').with({
91 'loadfile_name' => 'unixd_fcgid.load'
94 it { is_expected.to contain_package("mod_fcgid") }
98 context "on a FreeBSD OS" do
101 :osfamily => 'FreeBSD',
102 :operatingsystemrelease => '9',
103 :operatingsystemmajrelease => '9',
104 :concat_basedir => '/dne',
105 :operatingsystem => 'FreeBSD',
107 :kernel => 'FreeBSD',
108 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
113 it { is_expected.to contain_class("apache::params") }
114 it { is_expected.to contain_apache__mod('fcgid') }
115 it { is_expected.to contain_package("www/mod_fcgid") }
118 context "on a Gentoo OS" do
121 :osfamily => 'Gentoo',
122 :operatingsystem => 'Gentoo',
123 :operatingsystemrelease => '3.16.1-gentoo',
124 :concat_basedir => '/dne',
127 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin',
132 it { is_expected.to contain_class("apache::params") }
133 it { is_expected.to contain_apache__mod('fcgid') }
134 it { is_expected.to contain_package("www-apache/mod_fcgid") }