blob: 194cdf10fe0ccfae09c9b6a25f1e445d76ef7b01 (
plain)
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
|
require 'spec_helper_system'
describe 'ntp::config class' do
let(:os) {
node.facts['osfamily']
}
puppet_apply(%{
class { 'ntp': }
})
case node.facts['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 'Linux'
case node.facts['operatingsystem']
when 'ArchLinux'
line = '0.pool.ntp.org'
when 'Gentoo'
line = '0.gentoo.pool.ntp.org'
end
end
describe file('/etc/ntp.conf') do
it { should be_file }
it { should contain line }
end
end
|