057ef69824
Upstream link to module: https://github.com/puppetlabs/puppetlabs-ntp Upstream SHA commit: 1f519f719552aedc98b6995e42d23201a0286a58 Change-Id: Ib481907044ebd7f4f147ce1a26de5489620904ff Related-Bug: 1298360
37 lines
910 B
Ruby
37 lines
910 B
Ruby
require 'spec_helper_acceptance'
|
|
|
|
if (fact('osfamily') == 'Solaris')
|
|
config = '/etc/inet/ntp.conf'
|
|
else
|
|
config = '/etc/ntp.conf'
|
|
end
|
|
|
|
describe "ntp class with disable_monitor:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
|
context 'should run successfully' do
|
|
pp = "class { 'ntp': disable_monitor => true }"
|
|
|
|
it 'runs twice' do
|
|
apply_manifest(pp, :catch_failures => true)
|
|
apply_manifest(pp, :catch_changes => true)
|
|
end
|
|
|
|
describe file("#{config}") do
|
|
its(:content) { should match('disable monitor') }
|
|
end
|
|
end
|
|
|
|
context 'should run successfully' do
|
|
pp = "class { 'ntp': disable_monitor => false }"
|
|
|
|
it 'runs twice' do
|
|
apply_manifest(pp, :catch_failures => true)
|
|
apply_manifest(pp, :catch_changes => true)
|
|
end
|
|
|
|
describe file("#{config}") do
|
|
its(:content) { should_not match('disable monitor') }
|
|
end
|
|
end
|
|
|
|
end
|