Skip to content

Rework the requestkey's test to pass on SLES. #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions spec/acceptance/ntp_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,22 @@ class { 'ntp':
keys_enable => true,
keys_file => '/etc/ntp/keys',
keys_controlkey => '/etc/ntp/controlkey',
keys_requestkey => '/etc/ntp/requestkey',
keys_trusted => [ '/etc/ntp/key1', '/etc/ntp/key2' ],
keys_requestkey => '1',
keys_trusted => [ '1', '2' ],
}
EOS
# Rely on a shell command instead of a file{} here to avoid loops
# within puppet when it tries to manage /etc/ntp/keys before /etc/ntp.
shell("mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys")
apply_manifest(pp, :catch_failures => true)
end

describe file('/etc/ntp.conf') do
it { should be_file }
it { should contain 'keys /etc/ntp/keys' }
it { should contain 'controlkey /etc/ntp/controlkey' }
it { should contain 'requestkey /etc/ntp/requestkey' }
it { should contain 'trustedkey /etc/ntp/key1 /etc/ntp/key2' }
it { should contain 'requestkey 1' }
it { should contain 'trustedkey 1 2' }
end
end

Expand Down