From d311afd85f803c2bd6f26f2e1c2b883d8249422d Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 18 Oct 2022 05:41:19 +0200 Subject: [PATCH] Disable tests that fail due to expired certificates --- ... => voms-api-java-expired-2022-09-24.patch | 13 ++ voms-api-java-expired-2022-10-08.patch | 111 ++++++++++++++++++ voms-api-java-no-mt-test.patch | 13 -- voms-api-java.spec | 25 ++-- 4 files changed, 141 insertions(+), 21 deletions(-) rename voms-api-java-crypto-policy.patch => voms-api-java-expired-2022-09-24.patch (70%) create mode 100644 voms-api-java-expired-2022-10-08.patch delete mode 100644 voms-api-java-no-mt-test.patch diff --git a/voms-api-java-crypto-policy.patch b/voms-api-java-expired-2022-09-24.patch similarity index 70% rename from voms-api-java-crypto-policy.patch rename to voms-api-java-expired-2022-09-24.patch index 81be0c0..7169433 100644 --- a/voms-api-java-crypto-policy.patch +++ b/voms-api-java-expired-2022-09-24.patch @@ -33,3 +33,16 @@ index 8b420a9..df91a02 100644 public void testInvalidLSCSignatureFailure() throws Exception { VOMSAA aa = Utils.getVOMSAA(); +diff --git a/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java b/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java +index 496455e..d9b26cc 100644 +--- a/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java ++++ b/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java +@@ -167,7 +167,7 @@ public class TestConcurrentValidation { + + } + +- @Test ++ // @Test + public void test() throws InterruptedException, BrokenBarrierException { + + long start = System.currentTimeMillis(); diff --git a/voms-api-java-expired-2022-10-08.patch b/voms-api-java-expired-2022-10-08.patch new file mode 100644 index 0000000..24839bb --- /dev/null +++ b/voms-api-java-expired-2022-10-08.patch @@ -0,0 +1,111 @@ +diff --git a/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java b/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java +index bc7557c..80120db 100644 +--- a/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java ++++ b/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java +@@ -301,7 +301,7 @@ public class TestACGeneration { + assertEquals(validatedAttrs.size(), 0); + } + +- @Test ++ // @Test + public void testSuccesfullACExtractionFromProxy() { + + ValidationResultChecker c = new ValidationResultChecker(true); +diff --git a/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java b/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java +index 8b420a9..b35aa8a 100644 +--- a/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java ++++ b/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java +@@ -62,7 +62,7 @@ public class TestACValidator implements Fixture { + + } + +- @Test ++ // @Test + public void testValidityCheckSuccess() throws Exception { + + ProxyCertificate proxy = Utils.getVOMSAA().createVOMSProxy(holder, defaultVOFqans); +@@ -96,7 +96,7 @@ public class TestACValidator implements Fixture { + Assert.assertEquals(VOMSValidationErrorCode.acNotValidAtCurrentTime, m.getErrorCode()); + } + +- @Test ++ // @Test + public void testHolderCheckFailure() throws Exception { + + ProxyCertificate proxy = +@@ -172,7 +172,7 @@ public class TestACValidator implements Fixture { + + } + +- @Test ++ // @Test + public void testEmptyACCertsExtensionSuccess() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -256,7 +256,7 @@ public class TestACValidator implements Fixture { + r.getValidationErrors().get(1).getErrorCode()); + } + +- @Test ++ // @Test + public void testUnknownCriticalExtensionFailure() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -281,7 +281,7 @@ public class TestACValidator implements Fixture { + r.getValidationErrors().get(0).getMessage()); + } + +- @Test ++ // @Test + public void testCriticalAKIDFailure() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -304,7 +304,7 @@ public class TestACValidator implements Fixture { + r.getValidationErrors().get(0).getMessage()); + } + +- @Test ++ // @Test + public void testCriticalNoRevAvailFailure() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -329,7 +329,7 @@ public class TestACValidator implements Fixture { + r.getValidationErrors().get(0).getMessage()); + } + +- @Test ++ // @Test + public void testTargetValidationSuccess() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -355,7 +355,7 @@ public class TestACValidator implements Fixture { + Assert.assertTrue(r.isValid()); + } + +- @Test ++ // @Test + public void testTargetValidationFailure() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +@@ -375,7 +375,7 @@ public class TestACValidator implements Fixture { + + } + +- @Test ++ // @Test + public void testResolveHostnameException() throws Exception { + + VOMSAA aa = Utils.getVOMSAA(); +diff --git a/src/test/java/org/italiangrid/voms/test/req/TestRequests.java b/src/test/java/org/italiangrid/voms/test/req/TestRequests.java +index d00ad46..214bde7 100644 +--- a/src/test/java/org/italiangrid/voms/test/req/TestRequests.java ++++ b/src/test/java/org/italiangrid/voms/test/req/TestRequests.java +@@ -41,7 +41,7 @@ import eu.emi.security.authn.x509.impl.PEMCredential; + + public class TestRequests implements Fixture { + +- @Test ++ // @Test + public void testEchoRequest() throws Exception { + + VOMSACService acService = Utils.buildACService(new EchoVOMSProtocol(Utils.getAACredential())); diff --git a/voms-api-java-no-mt-test.patch b/voms-api-java-no-mt-test.patch deleted file mode 100644 index 75df0ed..0000000 --- a/voms-api-java-no-mt-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java b/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java -index 496455e..d9b26cc 100644 ---- a/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java -+++ b/src/test/java/org/italiangrid/voms/test/mt/TestConcurrentValidation.java -@@ -167,7 +167,7 @@ public class TestConcurrentValidation { - - } - -- @Test -+ // @Test - public void test() throws InterruptedException, BrokenBarrierException { - - long start = System.currentTimeMillis(); diff --git a/voms-api-java.spec b/voms-api-java.spec index 1b653d0..fa42e09 100644 --- a/voms-api-java.spec +++ b/voms-api-java.spec @@ -1,20 +1,26 @@ +%if %{?rhel}%{!?rhel:0} == 7 +%global java_arches ppc64le x86_64 +%endif + Name: voms-api-java Version: 3.3.2 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Virtual Organization Membership Service Java API License: ASL 2.0 URL: https://wiki.italiangrid.it/VOMS Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -# Disable failing tests -# IllegalState object explicit - implicit expected. -# https://github.com/italiangrid/voms-api-java/issues/29 +# Disable failing tests +# IllegalState object explicit - implicit expected. +# https://github.com/italiangrid/voms-api-java/issues/29 Patch0: %{name}-disable-some-tests.patch -# Disable failing multi-thread test -Patch1: %{name}-no-mt-test.patch -# Disable tests using obsolete hashes (md5/sha1) -Patch2: %{name}-crypto-policy.patch +# Disable tests that fail due to expired certificates +# https://github.com/italiangrid/voms-api-java/issues/30 +# 2022-09-24 (test0.cert.pem, wilco_cnaf_infn_it.cert.pem) +Patch1: %{name}-expired-2022-09-24.patch +# 2022-10-08 (test_host_cnaf_infn_it.cert.pem) +Patch2: %{name}-expired-2022-10-08.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -85,6 +91,9 @@ Virtual Organization Membership Service (VOMS) Java API Documentation. %license LICENSE %changelog +* Mon Oct 17 2022 Mattias Ellert - 3.3.2-10 +- Disable tests that fail due to expired certificates + * Wed Sep 28 2022 Mattias Ellert - 3.3.2-9 - Disable failing multi-thread test - Disable tests using obsolete hashes (md5/sha1)