X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fapache%2Fspec%2Fclasses%2Fmod%2Ffcgid_spec.rb;fp=3rdparty%2Fmodules%2Fapache%2Fspec%2Fclasses%2Fmod%2Ffcgid_spec.rb;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=096717d351b2593922ccf3f8ca3b79b30cfaba9a;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/apache/spec/classes/mod/fcgid_spec.rb b/3rdparty/modules/apache/spec/classes/mod/fcgid_spec.rb deleted file mode 100644 index 096717d35..000000000 --- a/3rdparty/modules/apache/spec/classes/mod/fcgid_spec.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::fcgid', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :is_pe => false, - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("libapache2-mod-fcgid") } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :is_pe => false, - } - end - - describe 'without parameters' do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("mod_fcgid") } - end - - describe 'with parameters' do - let :params do { - :options => { - 'FcgidIPCDir' => '/var/run/fcgidsock', - 'SharememPath' => '/var/run/fcgid_shm', - 'FcgidMinProcessesPerClass' => '0', - 'AddHandler' => 'fcgid-script .fcgi', - } - } end - - it 'should contain the correct config' do - content = catalogue.resource('file', 'fcgid.conf').send(:parameters)[:content] - expect(content.split("\n").reject { |c| c =~ /(^#|^$)/ }).to eq([ - '', - ' AddHandler fcgid-script .fcgi', - ' FcgidIPCDir /var/run/fcgidsock', - ' FcgidMinProcessesPerClass 0', - ' SharememPath /var/run/fcgid_shm', - '', - ]) - end - end - end - - context "on RHEL7" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '7', - :operatingsystemmajrelease => '7', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :is_pe => false, - } - end - - describe 'without parameters' do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid').with({ - 'loadfile_name' => 'unixd_fcgid.load' - }) - } - it { is_expected.to contain_package("mod_fcgid") } - end - end - - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :operatingsystemmajrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :is_pe => false, - } - end - - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("www/mod_fcgid") } - end - - context "on a Gentoo OS" do - let :facts do - { - :osfamily => 'Gentoo', - :operatingsystem => 'Gentoo', - :operatingsystemrelease => '3.16.1-gentoo', - :concat_basedir => '/dne', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin', - :is_pe => false, - } - end - - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("www-apache/mod_fcgid") } - end -end