mirror of
https://github.com/roles-ansible/ansible_role_ntp.git
synced 2024-08-16 12:59:49 +02:00
add inspec tests
This commit is contained in:
parent
bfa085c650
commit
cb9b855b4c
1 changed files with 23 additions and 0 deletions
23
tests/inspec/install_spec.rb
Normal file
23
tests/inspec/install_spec.rb
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Test ntp daemon install
|
||||||
|
|
||||||
|
ntp_package = "ntp"
|
||||||
|
ntp_service = "ntp"
|
||||||
|
|
||||||
|
control 'install-01' do
|
||||||
|
impact 1.0
|
||||||
|
title 'Ntp package'
|
||||||
|
desc 'Ntp daemon package should be install'
|
||||||
|
describe package(ntp_package) do
|
||||||
|
it { should be_installed }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
control 'install-02' do
|
||||||
|
impact 1.0
|
||||||
|
title 'Ntp service'
|
||||||
|
desc 'Ntp service should be enabled and started'
|
||||||
|
describe service(ntp_service) do
|
||||||
|
it { should be_enabled }
|
||||||
|
it { should be_running }
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue