Skip to content

Commit 795dcb2

Browse files
committed
Added spec for comparing contents of keyring file
1 parent 6832736 commit 795dcb2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/acceptance/apt_keyring_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require 'spec_helper_acceptance'
44

5+
PUPPETLABS_KEYRING_CHECK_COMMAND = 'gpg --show-keys /etc/apt/keyrings/puppetlabs-keyring.gpg | grep -F -A 1 \'pub rsa4096 2019-04-08 [SC] [expires: 2025-04-06]\' | grep \'D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26\''
6+
57
describe 'apt::keyring' do
68
context 'when using default values and source specified explicitly' do
79
keyring_pp = <<-MANIFEST
@@ -16,8 +18,8 @@
1618
end
1719
end
1820

19-
it 'expects file to be present at default location' do
20-
run_shell('rm /etc/apt/keyrings/puppetlabs-keyring.gpg')
21+
it 'expects file content to be present and correct' do
22+
run_shell(PUPPETLABS_KEYRING_CHECK_COMMAND.to_s)
2123
end
2224
end
2325
end

0 commit comments

Comments
 (0)