diff options
author | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-07-09 16:24:55 -0400 |
---|---|---|
committer | Ashley Penney <ashley.penney@puppetlabs.com> | 2013-07-09 16:24:55 -0400 |
commit | f6d637e2394e8ad36a8f67aefaa4e050d2a163b4 (patch) | |
tree | 85a2e417a59df0da6db73eef6e5b4662e3deea48 /spec | |
parent | b1bedbe26227680d47250e1f4c542384baa43982 (diff) |
Add service checks.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/system/ntp_service_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/system/ntp_service_spec.rb b/spec/system/ntp_service_spec.rb new file mode 100644 index 0000000..b97e2a4 --- /dev/null +++ b/spec/system/ntp_service_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper_system' + + +describe 'ntp::service class' do + let(:os) { + node.facts['osfamily'] + } + + case node.facts['osfamily'] + when 'RedHat', 'FreeBSD', 'Linux' + servicename = 'ntpd' + else + servicename = 'ntp' + end + + puppet_apply(%{ + class { 'ntp': } + }) + + describe service(servicename) do + it { should be_enabled } + it { should be_running } + end + +end |