From cb9b855b4cf1e19f8b3c34b6a1bb667d9003dbf0 Mon Sep 17 00:00:00 2001 From: diodonfrost Date: Fri, 28 Dec 2018 11:08:33 +0100 Subject: [PATCH] add inspec tests --- tests/inspec/install_spec.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/inspec/install_spec.rb diff --git a/tests/inspec/install_spec.rb b/tests/inspec/install_spec.rb new file mode 100644 index 0000000..9a11949 --- /dev/null +++ b/tests/inspec/install_spec.rb @@ -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