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