Disable tests that fail due to expired certificates

This commit is contained in:
Mattias Ellert 2022-10-18 05:41:19 +02:00
commit d311afd85f
4 changed files with 141 additions and 21 deletions

View file

@ -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();

View file

@ -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()));

View file

@ -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();

View file

@ -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 <mattias.ellert@physics.uu.se> - 3.3.2-10
- Disable tests that fail due to expired certificates
* Wed Sep 28 2022 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.2-9
- Disable failing multi-thread test
- Disable tests using obsolete hashes (md5/sha1)