You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2024/03/12 11:58:25 UTC

(camel-quarkus) branch camel-main updated (b7ad82a106 -> 151b460730)

This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a change to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


    from b7ad82a106 Fixed main-yaml -  inlining requires unique routes, partialy fixed openapi-java
     new c8ec9b540e Fixed openapi-kava, get rid of v2, because of CAMEL-20488
     new 151b460730 Micrometer logging for CI debugging purposes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../component/micrometer/it/MicrometerTest.java    |   5 +-
 integration-tests/openapi-java/pom.xml             |  12 --
 .../component/openapijava/it/v2/OpenApiV2IT.java   |  25 ----
 .../component/openapijava/it/v2/OpenApiV2Test.java | 154 ---------------------
 .../openapijava/it/v2/OpenApiV2TestProfile.java    |  30 ----
 5 files changed, 4 insertions(+), 222 deletions(-)
 delete mode 100644 integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2IT.java
 delete mode 100644 integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2Test.java
 delete mode 100644 integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2TestProfile.java


(camel-quarkus) 02/02: Micrometer logging for CI debugging purposes

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 151b460730dc2b0a78f743110a46ffb567bf069b
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Tue Mar 12 12:58:12 2024 +0100

    Micrometer logging for CI debugging purposes
---
 .../apache/camel/quarkus/component/micrometer/it/MicrometerTest.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java b/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
index af1b4f42a9..66320eb929 100644
--- a/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
+++ b/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
@@ -29,6 +29,7 @@ import io.quarkus.test.junit.DisabledOnIntegrationTest;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.path.json.JsonPath;
+import org.jboss.logging.Logger;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
@@ -39,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @QuarkusTest
 class MicrometerTest extends AbstractMicrometerTest {
-
+    private static final Logger LOG = Logger.getLogger(MicrometerTest.class);
     @Test
     public void testMicrometerMetricsCounter() throws Exception {
         RestAssured.get("/micrometer/counter/0")
@@ -183,6 +184,8 @@ class MicrometerTest extends AbstractMicrometerTest {
         //extract required values
         Map<String, Float> result = jsonPath.getMap(
                 "gauges.findAll { it.id.name =~ /routes/ && it.id.tags.find { it.customTag } }.collectEntries { [it.id.name, it.value] }");
+        //todo remove for debugging purposes
+        LOG.info("Dumped json is " + result);
 
         assertEquals(result.size(), 3);
         assertTrue(result.containsKey("camel.routes.running"));


(camel-quarkus) 01/02: Fixed openapi-kava, get rid of v2, because of CAMEL-20488

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit c8ec9b540e58bd9a553185d965654f691aa34aec
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Tue Mar 12 12:52:23 2024 +0100

    Fixed openapi-kava, get rid of v2, because of CAMEL-20488
---
 integration-tests/openapi-java/pom.xml             |  12 --
 .../component/openapijava/it/v2/OpenApiV2IT.java   |  25 ----
 .../component/openapijava/it/v2/OpenApiV2Test.java | 154 ---------------------
 .../openapijava/it/v2/OpenApiV2TestProfile.java    |  30 ----
 4 files changed, 221 deletions(-)

diff --git a/integration-tests/openapi-java/pom.xml b/integration-tests/openapi-java/pom.xml
index 494797bcea..a812fdf743 100644
--- a/integration-tests/openapi-java/pom.xml
+++ b/integration-tests/openapi-java/pom.xml
@@ -95,18 +95,6 @@
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-failsafe-plugin</artifactId>
                         <executions>
-                            <execution>
-                                <id>profile-openapi-v2</id>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                                <configuration>
-                                    <systemPropertyVariables>
-                                        <test.profile>openapi.v2</test.profile>
-                                    </systemPropertyVariables>
-                                </configuration>
-                            </execution>
                             <execution>
                                 <id>profile-openapi-v3</id>
                                 <goals>
diff --git a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2IT.java b/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2IT.java
deleted file mode 100644
index 5ea4a935b5..0000000000
--- a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2IT.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.openapijava.it.v2;
-
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
-
-@QuarkusIntegrationTest
-@EnabledIfSystemProperty(named = "test.profile", matches = "openapi.v2")
-class OpenApiV2IT extends OpenApiV2Test {
-}
diff --git a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2Test.java b/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2Test.java
deleted file mode 100644
index 31d73ce417..0000000000
--- a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2Test.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.openapijava.it.v2;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.quarkus.test.junit.TestProfile;
-import io.restassured.RestAssured;
-import io.restassured.http.ContentType;
-import org.apache.camel.quarkus.component.openapijava.it.OpenApiContentType;
-import org.apache.camel.quarkus.component.openapijava.it.common.OpenApiTest;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.EnumSource;
-
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.is;
-
-/**
- * Tests specific to OpenAPI 2.x
- */
-@QuarkusTest
-@TestProfile(OpenApiV2TestProfile.class)
-public class OpenApiV2Test extends OpenApiTest {
-
-    @Override
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiOperationSpecification(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "paths.'/api/operation/spec'", hasKey("get"),
-                        "paths.'/api/operation/spec'.get.parameters[0].name", is("header_number"),
-                        "paths.'/api/operation/spec'.get.parameters[0].description", is("Header Param Number"),
-                        "paths.'/api/operation/spec'.get.parameters[0].default", is(1),
-                        "paths.'/api/operation/spec'.get.parameters[0].enum", contains(1, 2, 3),
-                        "paths.'/api/operation/spec'.get.parameters[0].type", is("integer"),
-                        "paths.'/api/operation/spec'.get.parameters[0].in", is("header"),
-                        "paths.'/api/operation/spec'.get.parameters[0].required", is(true),
-                        "paths.'/api/operation/spec'.get.parameters[1].name", is("query_letter"),
-                        "paths.'/api/operation/spec'.get.parameters[1].description", is("Query Param Letter"),
-                        "paths.'/api/operation/spec'.get.parameters[1].default", is("B"),
-                        "paths.'/api/operation/spec'.get.parameters[1].enum", contains("A", "B", "C"),
-                        "paths.'/api/operation/spec'.get.parameters[1].type", is("string"),
-                        "paths.'/api/operation/spec'.get.parameters[1].in", is("query"),
-                        "paths.'/api/operation/spec'.get.parameters[1].required", is(false),
-                        "paths.'/api/operation/spec'.get.responses.418.headers.rate.type", is("integer"),
-                        "paths.'/api/operation/spec'.get.responses.418.headers.rate.description", is("API Rate Limit"),
-                        "paths.'/api/operation/spec'.get.responses.418.description", is("I am a teapot"),
-                        "paths.'/api/operation/spec'.get.responses.error.description", is("Response Error"));
-    }
-
-    @Override
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiBasicAuthSecurityDefinition(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "securityDefinitions", hasKey("basicAuth"),
-                        "securityDefinitions.basicAuth.type", is("basic"),
-                        "securityDefinitions.basicAuth.description", is("Basic Authentication"));
-    }
-
-    @Override
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiKeySecurityDefinition(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "securityDefinitions", hasKey("X-API-Key"),
-                        "securityDefinitions.X-API-Key.type", is("apiKey"),
-                        "securityDefinitions.X-API-Key.description", is("The API key"),
-                        "securityDefinitions.X-API-Key.name", is("X-API-KEY"),
-                        "securityDefinitions.X-API-Key.in", is("header"));
-    }
-
-    @Override
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiOauth2SecurityDefinition(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "securityDefinitions", hasKey("oauth2"),
-                        "securityDefinitions.oauth2.authorizationUrl", is("https://secure.apache.org/fake/oauth2/authorize"),
-                        "securityDefinitions.oauth2.flow", is("implicit"),
-                        "securityDefinitions.oauth2.scopes.scope1", is("Scope 1"),
-                        "securityDefinitions.oauth2.scopes.scope2", is("Scope 2"),
-                        "securityDefinitions.oauth2.scopes.scope3", is("Scope 3"));
-    }
-
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiDefinition(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "host", is("localhost:8080"),
-                        "basePath", is("/api"),
-                        "schemes", contains("http", "https"));
-    }
-
-    @ParameterizedTest
-    @EnumSource(OpenApiContentType.class)
-    public void openApiDefinitions(OpenApiContentType contentType) {
-        RestAssured.given()
-                .header("Accept", contentType.getMimeType())
-                .get("/openapi")
-                .then()
-                .contentType(ContentType.JSON)
-                .statusCode(200)
-                .body(
-                        "definitions.Fruit.type", is("object"),
-                        "definitions.Fruit.properties.name.type", is("string"),
-                        "definitions.Fruit.properties.description.type", is("string"),
-                        "definitions.Fruit.properties.num.type", is("integer"));
-    }
-}
diff --git a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2TestProfile.java b/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2TestProfile.java
deleted file mode 100644
index 325ddc8be6..0000000000
--- a/integration-tests/openapi-java/src/test/java/org/apache/camel/quarkus/component/openapijava/it/v2/OpenApiV2TestProfile.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.openapijava.it.v2;
-
-import java.util.Map;
-
-import io.quarkus.test.junit.QuarkusTestProfile;
-import org.apache.camel.util.CollectionHelper;
-
-public class OpenApiV2TestProfile implements QuarkusTestProfile {
-
-    @Override
-    public Map<String, String> getConfigOverrides() {
-        return CollectionHelper.mapOf("openapi.version", "2.0.0");
-    }
-}