forked from puppetlabs/puppetlabs-ntp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathntp_config_spec.rb
38 lines (35 loc) · 869 Bytes
/
ntp_config_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
require 'spec_helper_acceptance'
case fact('osfamily')
when 'FreeBSD'
line = '0.freebsd.pool.ntp.org iburst maxpoll 9'
when 'Debian'
line = '0.debian.pool.ntp.org iburst'
when 'RedHat'
line = '0.centos.pool.ntp.org'
when 'SuSE'
line = '0.opensuse.pool.ntp.org'
when 'Gentoo'
line = '0.gentoo.pool.ntp.org'
when 'Linux'
case fact('operatingsystem')
when 'ArchLinux'
line = '0.pool.ntp.org'
when 'Gentoo'
line = '0.gentoo.pool.ntp.org'
end
when 'Solaris'
line = '0.pool.ntp.org'
when 'AIX'
line = '0.debian.pool.ntp.org iburst'
end
describe 'ntp::config class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
it 'sets up ntp.conf' do
apply_manifest(%{
class { 'ntp': }
}, :catch_failures => true)
end
describe file('/etc/ntp.conf') do
it { should be_file }
it { should contain line }
end
end