File tree 4 files changed +27
-18
lines changed
4 files changed +27
-18
lines changed Original file line number Diff line number Diff line change 2
2
3
3
describe 'apache::ssl' , :type => :class do
4
4
5
- it { should include_class ( "apache" ) }
6
- it { should include_class ( "apache::params" ) }
5
+ describe 'when running on an unsupported OS' do
6
+ let ( :facts ) { { :operatingsystem => 'MagicUnicorn' } }
7
+ it {
8
+ expect {
9
+ should raise_error ( Puppet ::Error , /not defined in apache::ssl/ )
10
+ }
11
+ }
12
+ end
7
13
8
- describe "it should install the ssl package in redhat" do
9
- let :facts do
10
- { :operatingsystem => 'redhat' }
11
- end
14
+ describe 'when running on a supported OS' do
15
+ let ( :facts ) { { :operatingsystem => 'redhat' } }
16
+ it { should include_class ( 'apache' ) }
17
+ it { should include_class ( 'apache::params' ) }
18
+ end
12
19
13
- it { should contain_package ( "apache_ssl_package" ) . with (
20
+ describe 'when running on redhat' do
21
+ let ( :facts ) { { :operatingsystem => 'redhat' } }
22
+ it {
23
+ should contain_package ( 'apache_ssl_package' ) . with (
14
24
'ensure' => 'installed'
15
25
)
16
26
}
17
27
end
18
28
19
- describe "it should contain a2mod ssl in debian" do
20
- let :facts do
21
- { :operatingsystem => 'debian' }
22
- end
23
-
24
- it { should contain_a2mod ( "ssl" ) . with (
25
- 'ensure' => 'present'
26
- )
29
+ describe 'when running on debian' do
30
+ let ( :facts ) { { :operatingsystem => 'debian' } }
31
+ it {
32
+ should contain_a2mod ( 'ssl' ) . with ( 'ensure' => 'present' )
27
33
}
28
34
end
29
35
Original file line number Diff line number Diff line change 6
6
'my_proxy_vhost'
7
7
end
8
8
9
+ let :facts do
10
+ { :operatingsystem => 'redhat' }
11
+ end
9
12
10
13
let :default_params do
11
14
{
51
54
it { should contain_file ( "#{ param_hash [ :priority ] } -#{ title } " ) . with ( {
52
55
'owner' => 'root' ,
53
56
'group' => 'root' ,
54
- 'mode' => '755 ' ,
57
+ 'mode' => '0755 ' ,
55
58
'require' => 'Package[httpd]' ,
56
59
'notify' => 'Service[httpd]'
57
60
} )
Original file line number Diff line number Diff line change 38
38
it { should contain_file ( "#{ param_hash [ :priority ] } -#{ title } " ) . with ( {
39
39
'owner' => 'root' ,
40
40
'group' => 'root' ,
41
- 'mode' => '755 ' ,
41
+ 'mode' => '0755 ' ,
42
42
'require' => 'Package[httpd]' ,
43
43
'notify' => 'Service[httpd]'
44
44
} )
Original file line number Diff line number Diff line change 57
57
it { should contain_file ( "#{ param_hash [ :priority ] } -#{ title } .conf" ) . with ( {
58
58
'owner' => 'root' ,
59
59
'group' => 'root' ,
60
- 'mode' => '755 ' ,
60
+ 'mode' => '0755 ' ,
61
61
'require' => 'Package[httpd]' ,
62
62
'notify' => 'Service[httpd]'
63
63
} )
You can’t perform that action at this time.
0 commit comments