Skip to content

Commit 87996a4

Browse files
committed
Merge pull request #130 from apenney/fix-requestkey
Rework the requestkey's test to pass on SLES.
2 parents e7e1b20 + 091a52f commit 87996a4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

spec/acceptance/ntp_parameters_spec.rb

+7-4
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,22 @@ class { 'ntp':
6666
keys_enable => true,
6767
keys_file => '/etc/ntp/keys',
6868
keys_controlkey => '/etc/ntp/controlkey',
69-
keys_requestkey => '/etc/ntp/requestkey',
70-
keys_trusted => [ '/etc/ntp/key1', '/etc/ntp/key2' ],
69+
keys_requestkey => '1',
70+
keys_trusted => [ '1', '2' ],
7171
}
7272
EOS
73+
# Rely on a shell command instead of a file{} here to avoid loops
74+
# within puppet when it tries to manage /etc/ntp/keys before /etc/ntp.
75+
shell("mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys")
7376
apply_manifest(pp, :catch_failures => true)
7477
end
7578

7679
describe file('/etc/ntp.conf') do
7780
it { should be_file }
7881
it { should contain 'keys /etc/ntp/keys' }
7982
it { should contain 'controlkey /etc/ntp/controlkey' }
80-
it { should contain 'requestkey /etc/ntp/requestkey' }
81-
it { should contain 'trustedkey /etc/ntp/key1 /etc/ntp/key2' }
83+
it { should contain 'requestkey 1' }
84+
it { should contain 'trustedkey 1 2' }
8285
end
8386
end
8487

0 commit comments

Comments
 (0)