This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git
commit f04175b0f1bd6ba8bac559cec33eedfa7e58495f Author: Jean-Louis Monteiro <[email protected]> AuthorDate: Thu Apr 7 16:18:17 2022 +0200 Fix MicroProfile JWT setup and run it as part of the MicroProfile TCK --- tck/microprofile-tck/jwt/pom.xml | 8 ++-- .../jwt/src/test/resources/arquillian.xml | 1 + .../jwt/src/test/resources/dev.xml | 37 ++++++++++++------ tck/microprofile-tck/pom.xml | 44 +++++----------------- 4 files changed, 39 insertions(+), 51 deletions(-) diff --git a/tck/microprofile-tck/jwt/pom.xml b/tck/microprofile-tck/jwt/pom.xml index 0c3f24b274..8d80446667 100644 --- a/tck/microprofile-tck/jwt/pom.xml +++ b/tck/microprofile-tck/jwt/pom.xml @@ -139,7 +139,6 @@ <groupId>io.smallrye.config</groupId> <artifactId>smallrye-config-core</artifactId> <version>${microprofile.config.impl.version}</version> - <classifier>jakarta</classifier> <scope>test</scope> </dependency> <dependency> @@ -181,8 +180,7 @@ <artifactId>maven-surefire-plugin</artifactId> <configuration> <suiteXmlFiles> - <!-- TCK does not deliver the xml file for the moment --> - <suiteXmlFile>${project.build.directory}/test-classes/dev.xml</suiteXmlFile> + <suiteXmlFile>${project.build.directory}/dependency/suites/tck-base-suite.xml</suiteXmlFile> </suiteXmlFiles> <parallel>methods</parallel> <threadCount>4</threadCount> @@ -223,7 +221,7 @@ <goal>test</goal> </goals> <configuration> - <systemPropertyVariables> + <systemPropertyVariables combine.children="append"> <arquillian.launch>tomee-plus</arquillian.launch> </systemPropertyVariables> </configuration> @@ -234,7 +232,7 @@ <goal>test</goal> </goals> <configuration> - <systemPropertyVariables> + <systemPropertyVariables combine.children="append"> <arquillian.launch>tomee-plume</arquillian.launch> </systemPropertyVariables> </configuration> diff --git a/tck/microprofile-tck/jwt/src/test/resources/arquillian.xml b/tck/microprofile-tck/jwt/src/test/resources/arquillian.xml index 9fc654b381..88a4d51623 100644 --- a/tck/microprofile-tck/jwt/src/test/resources/arquillian.xml +++ b/tck/microprofile-tck/jwt/src/test/resources/arquillian.xml @@ -21,6 +21,7 @@ xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> + <container qualifier="tomee-microprofile" default="true"> <configuration> <property name="httpPort">-1</property> diff --git a/tck/microprofile-tck/jwt/src/test/resources/dev.xml b/tck/microprofile-tck/jwt/src/test/resources/dev.xml index cd42d598ae..355bb609e2 100644 --- a/tck/microprofile-tck/jwt/src/test/resources/dev.xml +++ b/tck/microprofile-tck/jwt/src/test/resources/dev.xml @@ -27,11 +27,11 @@ <include name="jaxrs" description="JAX-RS invocation tests"/> <include name="cdi" description="Base CDI injection of ClaimValues"/> <include name="cdi-json" description="CDI injection of JSON-P values"/> - <include name="cdi-provider" description="CDI injection of jakarta.inject.Provider values"/> + <include name="cdi-provider" description="CDI injection of javax.inject.Provider values"/> <include name="config" description="Validate configuration using MP-config"/> </define> <define name="excludes"> - <include name="debug" description="Internal debugging tests" /> + <include name="utils-extra" description="Additional utility tests" /> </define> <run> <include name="base-groups" /> @@ -40,6 +40,9 @@ </groups> <classes> <class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsTest" /> + <class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsEncryptTest" /> + <class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsSignEncryptTest" /> + <class name="org.eclipse.microprofile.jwt.tck.util.TokenUtilsExtraTest" /> <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.UnsecuredPingTest" /> <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.RequiredClaimsTest" /> <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ClaimValueInjectionTest" /> @@ -49,26 +52,36 @@ <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.InvalidTokenTest" /> <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.PrimitiveInjectionTest" /> <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.PrincipalInjectionTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.AudValidationTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.AudArrayValidationTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.AudValidationBadAudTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.AudValidationMissingAudTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ApplicationScopedInjectionTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.RsaKeySignatureTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsPEMTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsPEMLocationTest" /> - <!-- TODO - Replaced with internal test. TCK needs fixing since expects the app to be deployed before loading the key. Key load should be part of the deployment --> - <!-- <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsPEMLocationURLTest" /> --> - <class name="org.apache.tomee.microprofile.tck.jwt.config.PublicKeyAsPEMLocationTest"/> + <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsPEMLocationURLTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKLocationTest" /> - <!-- TODO - Replaced with internal test. TCK needs fixing since expects the app to be deployed before loading the key. Key load should be part of the deployment --> - <!-- <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKLocationURLTest" /> --> - <class name="org.apache.tomee.microprofile.tck.jwt.config.PublicKeyAsJWKLocationURLTest"/> + <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKLocationURLTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKSTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsJWKSLocationTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsBase64JWKTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.PublicKeyAsFileLocationURLTest" /> - <class name="org.eclipse.microprofile.jwt.tck.config.IssNoValidationNoIssTest" /> - <class name="org.eclipse.microprofile.jwt.tck.config.IssNoValidationBadIssTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.ECPublicKeyAsPEMTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.ECPublicKeyAsPEMLocationTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.ECPublicKeyAsJWKLocationTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.IssValidationTest" /> <class name="org.eclipse.microprofile.jwt.tck.config.IssValidationFailTest" /> - <class name="org.apache.tomee.microprofile.tck.jwt.validation.ExpClaimValidationTest" /> - <class name="org.apache.tomee.microprofile.tck.jwt.validation.ExpClaimAllowMissingExpValidationTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.CookieTokenTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.TokenAsCookieIgnoredTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.TokenAsCookieTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.EmptyTokenTest" /> + <class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.jwe.RolesAllowedSignEncryptTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.jwe.PrivateKeyAsPEMClasspathTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.jwe.PrivateKeyAsJWKClasspathTest" /> + <class name="org.eclipse.microprofile.jwt.tck.config.jwe.PrivateKeyAsJWKSClasspathTest" /> </classes> </test> + </suite> diff --git a/tck/microprofile-tck/pom.xml b/tck/microprofile-tck/pom.xml index 61b4fdec4b..6e2b9c07d6 100644 --- a/tck/microprofile-tck/pom.xml +++ b/tck/microprofile-tck/pom.xml @@ -29,38 +29,14 @@ <packaging>pom</packaging> <name>TomEE :: TCK :: MicroProfile</name> - <!-- JWT TCK has a dependency on Nashorn, which has disappeared in JDK12 onwards, we'll need to test on JDK 11 for now --> - <profiles> - <profile> - <id>java12plus</id> - <activation> - <jdk>[11,)</jdk> - </activation> - <modules> - <module>config</module> - <module>fault-tolerance</module> - <module>health</module> - <module>metrics</module> - <module>rest-client</module> - <module>openapi</module> - <module>opentracing</module> - </modules> - </profile> - <profile> - <id>main</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>config</module> - <module>jwt</module> - <module>fault-tolerance</module> - <module>health</module> - <module>metrics</module> - <module>rest-client</module> - <module>openapi</module> - <module>opentracing</module> - </modules> - </profile> - </profiles> + <modules> + <module>config</module> + <module>jwt</module> + <module>fault-tolerance</module> + <module>health</module> + <module>metrics</module> + <module>rest-client</module> + <module>openapi</module> + <module>opentracing</module> + </modules> </project>
