Sha256: 9c324b26a9ebc5fe294fc0849a79327d634d45005f9ccf77997abfd3d39193f9

Contents?: true

Size: 1.59 KB

Versions: 11

Compression:

Stored size: 1.59 KB

Contents

describe 'apache::mod::wsgi', :type => :class do
  let :pre_condition do
    'include apache'
  end
  context "on a Debian OS" do
    let :facts do
      {
        :osfamily               => 'Debian',
        :operatingsystemrelease => '6',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod('wsgi') }
    it { should contain_package("libapache2-mod-wsgi") }
  end
  context "on a RedHat OS" do
    let :facts do
      {
        :osfamily               => 'RedHat',
        :operatingsystemrelease => '6',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod('wsgi') }
    it { should contain_package("mod_wsgi") }

    describe "with custom WSGISocketPrefix" do
      let :params do
        { :wsgi_socket_prefix => 'run/wsgi' }
      end
      it {should contain_file('wsgi.conf').with_content(/^  WSGISocketPrefix run\/wsgi$/)}
    end
    describe "with custom WSGIPythonHome" do
      let :params do
        { :wsgi_python_home => '/path/to/virtenv' }
      end
      it {should contain_file('wsgi.conf').with_content(/^  WSGIPythonHome \/path\/to\/virtenv$/)}
    end
  end
  context "on a FreeBSD OS" do
    let :facts do
      {
        :osfamily               => 'FreeBSD',
        :operatingsystemrelease => '9',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod('wsgi') }
    it { should contain_package("www/mod_wsgi") }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.6.0 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.5.2 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.5.1 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.5.0 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.4.1 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.4.0 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.3.3 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.3.2 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.3.1 modules/apache/spec/classes/mod/wsgi_spec.rb
freighthop-0.3.0 modules/apache/spec/classes/mod/wsgi_spec.rb