Skip to content

Commit 3494b33

Browse files
author
Joshua Hoblitt
committed
add test for class pureftpd with $use_selinux
1 parent 5b258e1 commit 3494b33

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

spec/classes/pureftpd_spec.rb

+24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@
99
should include_class('pureftpd::install')
1010
should include_class('pureftpd::config')
1111
should include_class('pureftpd::service')
12+
should contain_package('pure-ftpd').with_ensure('present')
13+
should_not contain_package('pure-ftpd-selinux')
14+
should contain_file('/etc/pure-ftpd/pure-ftpd.conf').with_ensure('file')
15+
should contain_service('pure-ftpd').with({
16+
'ensure' => 'running',
17+
'enable' => 'true',
18+
})
19+
end
20+
end
21+
22+
describe 'with $use_selinux' do
23+
let(:params) {{ :use_selinux => true }}
24+
it do
25+
should include_class('pureftpd')
26+
should include_class('pureftpd::install')
27+
should include_class('pureftpd::config')
28+
should include_class('pureftpd::service')
29+
should contain_package('pure-ftpd').with_ensure('present')
30+
should contain_package('pure-ftpd-selinux').with_ensure('present')
31+
should contain_file('/etc/pure-ftpd/pure-ftpd.conf').with_ensure('file')
32+
should contain_service('pure-ftpd').with({
33+
'ensure' => 'running',
34+
'enable' => 'true',
35+
})
1236
end
1337
end
1438
end

0 commit comments

Comments
 (0)