diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox')
2 files changed, 4 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/PGPSignatureVerifierTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/PGPSignatureVerifierTest.java index 09d843f8c..36b50a545 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/PGPSignatureVerifierTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/PGPSignatureVerifierTest.java @@ -71,17 +71,13 @@ public class PGPSignatureVerifierTest { @Test public void testNoPublicKeyFound() throws Exception { - // To address https://bugs.eclipse.org/bugs/show_bug.cgi?id=575541 a signature - // for which no key can be found is ignored. - // Such an artifact will be treated the same as an unsigned artifact. - // The missing key information will be in the details presented to the user. IProcessingStepDescriptor processingStepDescriptor = new ProcessingStepDescriptor(null, null, false); IArtifactDescriptor artifact = createArtifact("signed_by_signer_1", "public_signer2.pgp"); try (PGPSignatureVerifier verifier = new PGPSignatureVerifier()) { verifier.initialize(null, processingStepDescriptor, artifact); IStatus status = verifier.getStatus(); - assertEquals(IStatus.OK, status.getSeverity()); - // assertTrue(status.getMessage().contains("Public key not found for")); + assertEquals(IStatus.ERROR, status.getSeverity()); + assertTrue(status.getMessage().contains("Public key not found for")); } } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java index 400ccdace..c010af306 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java @@ -62,10 +62,9 @@ public class PGPVerifierTest extends AbstractProvisioningTest { @Test public void testMissingPublicKey() throws Exception { - // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=575541 - // Missing PGP keys are ignored and the content is treated as unsigned. IStatus mirrorStatus = performMirrorFrom("repoMissingPublicKey"); - assertOK(mirrorStatus); + assertNotOK(mirrorStatus); + assertTrue(mirrorStatus.toString().contains("Public key not found")); } @Override |