X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fapache%2Fspec%2Fclasses%2Fmod%2Fmime_magic_spec.rb;fp=3rdparty%2Fmodules%2Fapache%2Fspec%2Fclasses%2Fmod%2Fmime_magic_spec.rb;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=f846ce386b1fdef06cdd395ed0c07766c148bb27;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/apache/spec/classes/mod/mime_magic_spec.rb b/3rdparty/modules/apache/spec/classes/mod/mime_magic_spec.rb deleted file mode 100644 index f846ce386..000000000 --- a/3rdparty/modules/apache/spec/classes/mod/mime_magic_spec.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_mime_magic_specs - it { is_expected.to contain_apache__mod("mime_magic") } -end - -describe 'apache::mod::mime_magic', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '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 - - general_mime_magic_specs() - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/apache2/magic\"\n" - ) - end - - it { is_expected.to contain_file("mime_magic.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/mime_magic.conf', - } ) } - it { is_expected.to contain_file("mime_magic.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/mime_magic.conf', - } ) } - - context "with magic_file => /tmp/Debian_magic" do - let :params do - { :magic_file => "/tmp/Debian_magic" } - end - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/Debian_magic\"\n" - ) - end - end - - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '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 - - general_mime_magic_specs() - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/httpd/conf/magic\"\n" - ) - end - - it { is_expected.to contain_file("mime_magic.conf").with_path("/etc/httpd/conf.d/mime_magic.conf") } - - end - - context "with magic_file => /tmp/magic" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '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 - - let :params do - { :magic_file => "/tmp/magic" } - end - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/magic\"\n" - ) - end - end - - -end