File tree 2 files changed +22
-4
lines changed
2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 14
14
group => ' root' ,
15
15
mode => ' 0444' ,
16
16
}
17
+
18
+ # make sure our package is installed and that our metadata directory
19
+ # exists
20
+ Class[ssl::package] -> Ssl::Cert<| |>
21
+ File [" ${::ssl::params::crt_dir} /meta" ] -> Ssl::Cert<| |>
17
22
}
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'ssl' , :type => :class do
4
+ let :pre_condition do
5
+ [
6
+ 'define ssl::cert {}' ,
7
+ 'ssl::cert { "certname": }'
8
+ ]
9
+ end
10
+
4
11
it do
5
- should contain_class ( 'ssl::package' ) . with_package ( 'openssl' )
12
+ should \
13
+ contain_class ( 'ssl::package' ) .
14
+ with_package ( 'openssl' ) .
15
+ that_comes_before ( 'ssl::cert[certname]' )
6
16
end
7
17
8
18
let :file_meta_params do
20
30
it do
21
31
should \
22
32
contain_file ( '/etc/pki/tls/certs/meta' ) .
23
- with ( file_meta_params )
33
+ with ( file_meta_params ) .
34
+ that_comes_before ( 'ssl::cert[certname]' )
24
35
end
25
36
end
26
37
30
41
it do
31
42
should \
32
43
contain_file ( '/etc/ssl/certs/meta' ) .
33
- with ( file_meta_params )
44
+ with ( file_meta_params ) .
45
+ that_comes_before ( 'ssl::cert[certname]' )
34
46
end
35
47
end
36
48
40
52
it do
41
53
should \
42
54
contain_file ( '/etc/ssl/certs/meta' ) .
43
- with ( file_meta_params )
55
+ with ( file_meta_params ) .
56
+ that_comes_before ( 'ssl::cert[certname]' )
44
57
end
45
58
end
46
59
end
You can’t perform that action at this time.
0 commit comments