25 lines
664 B
Ruby
25 lines
664 B
Ruby
require File.expand_path('../support/helpers', __FILE__)
|
|
|
|
describe 'ntp::default' do
|
|
|
|
include Helpers::Ntp
|
|
|
|
it 'Starts the NTP daemon' do
|
|
service(node['ntp']['service']).must_be_running
|
|
service(node['ntp']['service']).must_be_enabled
|
|
end
|
|
|
|
it 'Creates the leapfile' do
|
|
file(node['ntp']['leapfile']).must_exist.with(:owner, node['ntp']['conf_owner']).and(:group, node['ntp']['conf_group'])
|
|
end
|
|
|
|
it 'Creates the ntp.conf' do
|
|
file('/etc/ntp.conf').must_exist.with(:owner, node['ntp']['conf_owner']).and(:group, node['ntp']['conf_group'])
|
|
|
|
node['ntp']['servers'].each do |s|
|
|
file('/etc/ntp.conf').must_include s
|
|
end
|
|
end
|
|
|
|
end
|