Skip to content

Commit

Permalink
Fixes #4599 - Add Jakarta REST TCK certification for Piranha Core Pro…
Browse files Browse the repository at this point in the history
…file (#4600)
  • Loading branch information
mnriem authored Feb 17, 2025
1 parent 84afdba commit 56e7640
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/tck-coreprofile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,41 @@ jobs:
test/tck/coreprofile/jsonp/installer/target/tck/bin/tck-tests/target/surefire-reports/TEST-*.xml
test/tck/coreprofile/jsonp/installer/target/tck/bin/tck-tests-pluggability/target/surefire-reports/TEST-*.xml
if: always()
rest:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run TCK
run: |
mvn -B -DskipTests=true -DskipITs=true -ntp install
cd test/tck/coreprofile/rest
mvn -B -ntp install
- name: Test Summary
uses: test-summary/action@v2
id: test_summary
with:
paths: "test/tck/coreprofile/rest/runner/target/failsafe-reports/**/TEST-*.xml"
output: test-summary.md
if: always()
- name: Job Summary
run: |
echo "${{ steps.test_summary.outputs.passed }} out of ${{ steps.test_summary.outputs.total }} tests passed" >> $GITHUB_STEP_SUMMARY
if: always()
result:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ubuntu-latest
needs: [annotations, inject, jsonb, jsonp]
needs: [annotations, coreprofile, inject, jsonb, jsonp, rest]
steps:
- name: Check build results
run: |
Expand Down
2 changes: 2 additions & 0 deletions test/tck/coreprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<inject.tck.version>2.0.2</inject.tck.version>
<jsonb.tck.version>3.0.0</jsonb.tck.version>
<jsonp.tck.version>2.1.1</jsonp.tck.version>
<rest.tck.version>4.0.1</rest.tck.version>
<!-- Maven plugin versions -->
<sigtest-maven-plugin.version>2.4</sigtest-maven-plugin.version>
</properties>
Expand All @@ -46,5 +47,6 @@
<module>inject</module>
<module>jsonb</module>
<module>jsonp</module>
<module>rest</module>
</modules>
</project>
49 changes: 49 additions & 0 deletions test/tck/coreprofile/rest/installer/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile.rest</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>installer</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - REST TCK - Installer</name>
<properties>
<tck.home>${project.build.directory}/tck</tck.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Download, unzip and rename TCK -->
<get src="https://download.eclipse.org/jakartaee/restful-ws/4.0/jakarta-restful-ws-tck-${rest.tck.version}.zip"
dest="${project.build.directory}/tck.zip"
skipexisting="true"/>
<unzip src="${project.build.directory}/tck.zip"
dest="${project.build.directory}/tck"/>

<!-- Install the TCK artifact into local repository -->
<exec dir="${project.build.directory}/tck/restful-ws-tck/artifacts"
executable="mvn">
<arg line="install:install-file -Dfile=jakarta-restful-ws-tck-${rest.tck.version}.jar -DgroupId=jakarta.ws.rs -DartifactId=jakarta-restful-ws-tck -Dversion=${rest.tck.version} -Dpackaging=jar"/>
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions test/tck/coreprofile/rest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<groupId>cloud.piranha.test.tck.coreprofile.rest</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - REST TCK - Project</name>
<modules>
<module>installer</module>
<module>runner</module>
</modules>
</project>
117 changes: 117 additions & 0 deletions test/tck/coreprofile/rest/runner/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>

<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile.rest</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>runner</artifactId>
<packaging>jar</packaging>
<name>Piranha - Test - TCK - Core Profile - REST TCK - Runner</name>
<properties>
<commons-httpclient.version>3.1</commons-httpclient.version>
<hamcrest.version>3.0</hamcrest.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${arquillian.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>cloud.piranha.arquillian</groupId>
<artifactId>piranha-arquillian-managed</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta-restful-ws-tck</artifactId>
<version>${rest.tck.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>glassfish-client-ee11</artifactId>
<version>${glassfish-client-ee11.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>${commons-httpclient.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>verify</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<dependenciesToScan>
<dependency>jakarta.ws.rs:jakarta-restful-ws-tck</dependency>
</dependenciesToScan>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<systemPropertyVariables>
<arquillian.launch>piranha</arquillian.launch>
<cts.harness.debug>true</cts.harness.debug>
<junit.log.traceflag>true</junit.log.traceflag>
<porting.ts.url.class.1>ee.jakarta.tck.ws.rs.lib.implementation.sun.common.SunRIURL</porting.ts.url.class.1>
<servlet_adaptor>org.glassfish.jersey.servlet.ServletContainer</servlet_adaptor>
<webServerHost>localhost</webServerHost>
<webServerPort>8080</webServerPort>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
13 changes: 13 additions & 0 deletions test/tck/coreprofile/rest/runner/src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<arquillian
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<defaultProtocol type="Servlet 5.0" />
<container qualifier="piranha" default="true">
<configuration>
<property name="httpPort">8080</property>
</configuration>
</container>
</arquillian>

0 comments on commit 56e7640

Please sign in to comment.