]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/spec/classes/mod/python_spec.rb
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / spec / classes / mod / python_spec.rb
1 require 'spec_helper'
2
3 describe 'apache::mod::python', :type => :class do
4   let :pre_condition do
5     'include apache'
6   end
7   context "on a Debian OS" do
8     let :facts do
9       {
10         :osfamily               => 'Debian',
11         :operatingsystemrelease => '6',
12         :concat_basedir         => '/dne',
13         :lsbdistcodename        => 'squeeze',
14         :operatingsystem        => 'Debian',
15         :id                     => 'root',
16         :kernel                 => 'Linux',
17         :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
18         :is_pe                  => false,
19       }
20     end
21     it { is_expected.to contain_class("apache::params") }
22     it { is_expected.to contain_apache__mod("python") }
23     it { is_expected.to contain_package("libapache2-mod-python") }
24   end
25   context "on a RedHat OS" do
26     let :facts do
27       {
28         :osfamily               => 'RedHat',
29         :operatingsystemrelease => '6',
30         :concat_basedir         => '/dne',
31         :operatingsystem        => 'RedHat',
32         :id                     => 'root',
33         :kernel                 => 'Linux',
34         :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
35         :is_pe                  => false,
36       }
37     end
38     it { is_expected.to contain_class("apache::params") }
39     it { is_expected.to contain_apache__mod("python") }
40     it { is_expected.to contain_package("mod_python") }
41   end
42   context "on a FreeBSD OS" do
43     let :facts do
44       {
45         :osfamily               => 'FreeBSD',
46         :operatingsystemrelease => '9',
47         :concat_basedir         => '/dne',
48         :operatingsystem        => 'FreeBSD',
49         :id                     => 'root',
50         :kernel                 => 'FreeBSD',
51         :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
52         :is_pe                  => false,
53       }
54     end
55     it { is_expected.to contain_class("apache::params") }
56     it { is_expected.to contain_apache__mod("python") }
57     it { is_expected.to contain_package("www/mod_python3") }
58   end
59   context "on a Gentoo OS" do
60     let :facts do
61       {
62         :osfamily               => 'Gentoo',
63         :operatingsystem        => 'Gentoo',
64         :operatingsystemrelease => '3.16.1-gentoo',
65         :concat_basedir         => '/dne',
66         :id                     => 'root',
67         :kernel                 => 'Linux',
68         :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin',
69         :is_pe                  => false,
70       }
71     end
72     it { is_expected.to contain_class("apache::params") }
73     it { is_expected.to contain_apache__mod("python") }
74     it { is_expected.to contain_package("www-apache/mod_python") }
75   end
76 end