Skip to content

Commit

Permalink
add test for class pureftpd with $use_selinux
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Aug 2, 2013
1 parent 5b258e1 commit 3494b33
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions spec/classes/pureftpd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@
should include_class('pureftpd::install')
should include_class('pureftpd::config')
should include_class('pureftpd::service')
should contain_package('pure-ftpd').with_ensure('present')
should_not contain_package('pure-ftpd-selinux')
should contain_file('/etc/pure-ftpd/pure-ftpd.conf').with_ensure('file')
should contain_service('pure-ftpd').with({
'ensure' => 'running',
'enable' => 'true',
})
end
end

describe 'with $use_selinux' do
let(:params) {{ :use_selinux => true }}
it do
should include_class('pureftpd')
should include_class('pureftpd::install')
should include_class('pureftpd::config')
should include_class('pureftpd::service')
should contain_package('pure-ftpd').with_ensure('present')
should contain_package('pure-ftpd-selinux').with_ensure('present')
should contain_file('/etc/pure-ftpd/pure-ftpd.conf').with_ensure('file')
should contain_service('pure-ftpd').with({
'ensure' => 'running',
'enable' => 'true',
})
end
end
end

0 comments on commit 3494b33

Please sign in to comment.