You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/05/05 10:22:15 UTC

[camel-kamelets] branch main updated (850ba169 -> 8795f9cc)

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

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


    from 850ba169 aws-kinesis-source kamelets incompatible with camel 3.16
     new 0f79e580 Validate the parameters in a Kamelet by looking at catalog
     new 8795f9cc Validate the parameters in a Kamelet by looking at catalog

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:
 .../camel/kamelets/catalog/KameletsCatalogTest.java     | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)


[camel-kamelets] 02/02: Validate the parameters in a Kamelet by looking at catalog

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

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

commit 8795f9cccfd287d0401cc14d13c9d3d440cdd07f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 5 12:11:39 2022 +0200

    Validate the parameters in a Kamelet by looking at catalog
---
 .../java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
index 1fc35935..bada0576 100644
--- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
+++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
@@ -179,9 +179,8 @@ public class KameletsCatalogTest {
                                         .collect(Collectors.toList());
 
                         for (Map.Entry<String, Object> entry : p.entrySet()) {
-                            if (!entry.getKey().equals("period") && (!name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source"))) {
-                                    assertTrue(ceInternal.contains(entry.getKey()));
-
+                            if (!entry.getKey().equals("period") && (!name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source"))) {
+                                assertTrue(ceInternal.contains(entry.getKey()));
                             }
                         }
                     }


[camel-kamelets] 01/02: Validate the parameters in a Kamelet by looking at catalog

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

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

commit 0f79e580d0c2b59d3f28cbf2857c4683cbac1895
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 5 12:10:32 2022 +0200

    Validate the parameters in a Kamelet by looking at catalog
---
 .../camel/kamelets/catalog/KameletsCatalogTest.java  | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
index affbe6e2..1fc35935 100644
--- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
+++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
@@ -22,6 +22,8 @@ import io.github.classgraph.ClassGraph;
 
 import org.apache.camel.catalog.DefaultCamelCatalog;
 import org.apache.camel.kamelets.catalog.model.KameletTypeEnum;
+import org.apache.camel.tooling.model.ApiMethodModel;
+import org.apache.camel.tooling.model.ApiModel;
 import org.apache.camel.tooling.model.ComponentModel;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
@@ -32,6 +34,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
@@ -157,6 +160,15 @@ public class KameletsCatalogTest {
                 if (cleanName.equalsIgnoreCase("aws2-ddb") && name.equals("aws-ddb-streams-source")) {
                     cleanName = "aws2-ddb-streams";
                 }
+                if (cleanName.equalsIgnoreCase("google-sheets") && name.equals("google-sheets-source")) {
+                    cleanName = "google-sheets-stream";
+                }
+                if (cleanName.equalsIgnoreCase("google-mail") && name.equals("google-mail-source")) {
+                    cleanName = "google-mail-stream";
+                }
+                if (cleanName.equalsIgnoreCase("google-calendar") && name.equals("google-calendar-source")) {
+                    cleanName = "google-calendar-stream";
+                }
                 if (p != null && !p.isEmpty()) {
                     ComponentModel componentModel = cc.componentModel(cleanName);
                     if (componentModel != null) {
@@ -165,9 +177,11 @@ public class KameletsCatalogTest {
                                 ce.stream()
                                         .map(ComponentModel.EndpointOptionModel::getName)
                                         .collect(Collectors.toList());
-                    for (Map.Entry<String, Object> entry : p.entrySet()) {
-                            if (!entry.getKey().equals("period") && (!name.equals("kafka-ssl-source") && !name.equals("google-sheets-source") && !name.equals("google-mail-source") && !name.equals("google-calendar-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source"))) {
-                                assertTrue(ceInternal.contains(entry.getKey()));
+
+                        for (Map.Entry<String, Object> entry : p.entrySet()) {
+                            if (!entry.getKey().equals("period") && (!name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source"))) {
+                                    assertTrue(ceInternal.contains(entry.getKey()));
+
                             }
                         }
                     }