From ecd7897179b2a385d34c5ef1ef81102b8a263629 Mon Sep 17 00:00:00 2001 From: Majid Mostafavi Date: Mon, 12 Feb 2024 20:35:17 +0330 Subject: [PATCH] Add V7 Test Remove Open Tracing Add Telemetry --- src/it/java/org/eclipse/microprofile/starter/APITest.java | 4 ++++ .../microprofile/servers/model/VersionSpecMatrix.java | 1 - .../eclipse/microprofile/starter/rest/APIEndpointV7.java | 8 ++++++++ .../json_examples/v7/supportMatrix.json.segments | 4 ++++ .../json_examples/v7/supportMatrix_servers.json.segments | 3 +++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/eclipse/microprofile/starter/rest/APIEndpointV7.java create mode 100644 src/test/resources/json_examples/v7/supportMatrix.json.segments create mode 100644 src/test/resources/json_examples/v7/supportMatrix_servers.json.segments diff --git a/src/it/java/org/eclipse/microprofile/starter/APITest.java b/src/it/java/org/eclipse/microprofile/starter/APITest.java index 9badad27..8cac51c9 100644 --- a/src/it/java/org/eclipse/microprofile/starter/APITest.java +++ b/src/it/java/org/eclipse/microprofile/starter/APITest.java @@ -51,6 +51,8 @@ public class APITest { final Client client = ClientBuilder.newBuilder().build(); private WebTarget target; + private File v7Matrix; + private File v7MatrixServers; private File v6Matrix; private File v6MatrixServers; private File v5Matrix; @@ -63,6 +65,8 @@ public class APITest { @Before public void before() { target = client.target(API_URL); + v7Matrix = new File(getClass().getClassLoader().getResource("json_examples/v7/supportMatrix.json.segments").getFile()); + v7MatrixServers = new File(getClass().getClassLoader().getResource("json_examples/v7/supportMatrix_servers.json.segments").getFile()); v6Matrix = new File(getClass().getClassLoader().getResource("json_examples/v6/supportMatrix.json.segments").getFile()); v6MatrixServers = new File(getClass().getClassLoader().getResource("json_examples/v6/supportMatrix_servers.json.segments").getFile()); v5Matrix = new File(getClass().getClassLoader().getResource("json_examples/v5/supportMatrix.json.segments").getFile()); diff --git a/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/model/VersionSpecMatrix.java b/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/model/VersionSpecMatrix.java index f659f3fc..4227fadc 100644 --- a/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/model/VersionSpecMatrix.java +++ b/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/model/VersionSpecMatrix.java @@ -172,7 +172,6 @@ private void init() { .add(MicroprofileSpec.HEALTH_CHECKS, "4.0") .add(MicroprofileSpec.OPEN_API, "3.1") .add(MicroprofileSpec.REST_CLIENT, "3.0.0") - .add(MicroprofileSpec.OPEN_TRACING, "3.0") .add(MicroprofileSpec.METRICS, "5.0") .add(MicroprofileSpec.TELEMETRY,"1.0")); } diff --git a/src/main/java/org/eclipse/microprofile/starter/rest/APIEndpointV7.java b/src/main/java/org/eclipse/microprofile/starter/rest/APIEndpointV7.java new file mode 100644 index 00000000..854d1e7a --- /dev/null +++ b/src/main/java/org/eclipse/microprofile/starter/rest/APIEndpointV7.java @@ -0,0 +1,8 @@ +package org.eclipse.microprofile.starter.rest; + +import javax.ws.rs.Path; + +@Path("/7") +public class APIEndpointV7 extends APIEndpointLatest { + // The current latest version +} diff --git a/src/test/resources/json_examples/v7/supportMatrix.json.segments b/src/test/resources/json_examples/v7/supportMatrix.json.segments new file mode 100644 index 00000000..227511c6 --- /dev/null +++ b/src/test/resources/json_examples/v7/supportMatrix.json.segments @@ -0,0 +1,4 @@ +{"configs":{" +MP33":{"supportedServers":[" +]},"MP32":{"supportedServers":[ +]}},"descriptions":{"CONFIG":"Configuration - externalize and manage your configuration parameters outside your microservices","OPEN_API":"Open API - Generate OpenAPI-compliant API documentation for your microservices","HEALTH_CHECKS":"Health - Verify the health of your microservices with custom verifications","REST_CLIENT":"Rest Client - Invoke RESTful services in a type-safe manner","FAULT_TOLERANCE":"Fault Tolerance - all about bulkheads, timeouts, circuit breakers, retries, etc. for your microservices","JWT_AUTH":"JWT Propagation - propagate security across your microservices","TELEMETRY":" Telemetry - pulls in Telemetry Tracing and integrate with CDI and Jakarta RESTful Web Services","METRICS":"Metrics - Gather and create operational and business measurements for your microservices","GRAPHQL":"GraphQL - GraphQL is a query language for APIs and a library for fulfilling those queries with your existing data."}} \ No newline at end of file diff --git a/src/test/resources/json_examples/v7/supportMatrix_servers.json.segments b/src/test/resources/json_examples/v7/supportMatrix_servers.json.segments new file mode 100644 index 00000000..f1d70a4f --- /dev/null +++ b/src/test/resources/json_examples/v7/supportMatrix_servers.json.segments @@ -0,0 +1,3 @@ +"LIBERTY":[{"mpVersion":"MP12","mpSpecs":["CONFIG","FAULT_TOLERANCE","JWT_AUTH","METRICS","HEALTH_CHECKS","GRAPHQL"],"javaSEVersions":["SE8","SE11"],"buildTools":["MAVEN","GRADLE"]} +"WILDFLY_SWARM":[{"mpVersion":"MP12","mpSpecs":["CONFIG","FAULT_TOLERANCE","JWT_AUTH","METRICS","HEALTH_CHECKS"],"javaSEVersions":["SE8"],"buildTools":["MAVEN"]}] +"QUARKUS":[{"mpVersion":"MP32","mpSpecs":["CONFIG","FAULT_TOLERANCE","JWT_AUTH","METRICS","HEALTH_CHECKS","OPEN_API","TELEMETRY","REST_CLIENT"],"javaSEVersions":["SE8","SE11"],"buildTools":["MAVEN","GRADLE"]}] \ No newline at end of file