057ef69824
Upstream link to module: https://github.com/puppetlabs/puppetlabs-ntp Upstream SHA commit: 1f519f719552aedc98b6995e42d23201a0286a58 Change-Id: Ib481907044ebd7f4f147ce1a26de5489620904ff Related-Bug: 1298360
31 lines
805 B
Ruby
31 lines
805 B
Ruby
require 'spec_helper_acceptance'
|
|
|
|
if (fact('osfamily') == 'Solaris')
|
|
config = '/etc/inet/ntp.conf'
|
|
else
|
|
config = '/etc/ntp.conf'
|
|
end
|
|
|
|
describe 'preferred servers', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
|
pp = <<-EOS
|
|
class { '::ntp':
|
|
servers => ['a', 'b', 'c', 'd'],
|
|
preferred_servers => ['c', 'd'],
|
|
}
|
|
EOS
|
|
|
|
it 'applies cleanly' do
|
|
apply_manifest(pp, :catch_failures => true) do |r|
|
|
expect(r.stderr).not_to match(/error/i)
|
|
end
|
|
end
|
|
|
|
describe file("#{config}") do
|
|
it { should be_file }
|
|
its(:content) { should match 'server a' }
|
|
its(:content) { should match 'server b' }
|
|
its(:content) { should match /server c (iburst\s|)prefer/ }
|
|
its(:content) { should match /server d (iburst\s|)prefer/ }
|
|
end
|
|
end
|