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