# Apply the manifest (Retry if timeout error is received from key pool)
retry_on_error_matching do
apply_manifest(gpg_key_pp, catch_failures: true)
# Apply the manifest (Retry if timeout error is received from key pool)
retry_on_error_matching do
apply_manifest(gpg_key_pp, catch_failures: true)
retry_on_error_matching do
apply_manifest(hkp_pool_pp, catch_failures: true)
end
retry_on_error_matching do
apply_manifest(hkp_pool_pp, catch_failures: true)
end
retry_on_error_matching do
apply_manifest(hkps_ubuntu_pp, catch_failures: true)
end
retry_on_error_matching do
apply_manifest(hkps_ubuntu_pp, catch_failures: true)
end
it 'fails' do
apply_manifest(path_bogus_content_pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{no valid OpenPGP data found})
it 'fails' do
apply_manifest(path_bogus_content_pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{no valid OpenPGP data found})
describe 'fingerprint validation against source/content' do
context 'with fingerprint in id matches fingerprint from remote key' do
describe 'fingerprint validation against source/content' do
context 'with fingerprint in id matches fingerprint from remote key' do
apply_manifest_twice(fingerprint_match_pp)
end
end
context 'with fingerprint in id does NOT match fingerprint from remote key' do
apply_manifest_twice(fingerprint_match_pp)
end
end
context 'with fingerprint in id does NOT match fingerprint from remote key' do
apply_manifest(fingerprint_does_not_match_pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{don't match})
end
apply_manifest(fingerprint_does_not_match_pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{don't match})
end
apply_manifest(refresh_del_key_pp)
apply_manifest(refresh_pp, catch_failures: true)
end
apply_manifest(refresh_del_key_pp)
apply_manifest(refresh_pp, catch_failures: true)
end
context 'when refresh => true' do
it 'updates an expired key' do
apply_manifest(refresh_true_pp)
context 'when refresh => true' do
it 'updates an expired key' do
apply_manifest(refresh_true_pp)
context 'when refresh => false' do
it 'does not replace an expired key' do
apply_manifest(refresh_false_pp)
context 'when refresh => false' do
it 'does not replace an expired key' do
apply_manifest(refresh_false_pp)