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

[camel-k] branch main updated (06f27660d -> ad1c373c9)

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

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


    from 06f27660d Updated CHANGELOG.md
     new 2015ce4a1 fix(kamelet): migrate to Camel 3.15 yaml definition
     new ad1c373c9 fix(e2e): rest yaml definition as Camel 3.15

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:
 e2e/common/cli/bind_test.go                  |  8 ++++++++
 e2e/common/files/cron-quartz.yaml            | 20 ++++++++++----------
 e2e/common/files/cron-timer.yaml             | 20 ++++++++++----------
 e2e/common/files/rest-consumer.yaml          |  7 +++----
 pkg/controller/kameletbinding/integration.go |  8 ++++----
 5 files changed, 35 insertions(+), 28 deletions(-)


[camel-k] 01/02: fix(kamelet): migrate to Camel 3.15 yaml definition

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

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

commit 2015ce4a1892d08d3851448293c2e0711705dd92
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 5 15:27:29 2022 +0200

    fix(kamelet): migrate to Camel 3.15 yaml definition
    
    Closes #3255
---
 e2e/common/cli/bind_test.go                  |  8 ++++++++
 e2e/common/files/cron-quartz.yaml            | 20 ++++++++++----------
 e2e/common/files/cron-timer.yaml             | 20 ++++++++++----------
 pkg/controller/kameletbinding/integration.go |  8 ++++----
 4 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/e2e/common/cli/bind_test.go b/e2e/common/cli/bind_test.go
index dc118cd65..d40d9be58 100644
--- a/e2e/common/cli/bind_test.go
+++ b/e2e/common/cli/bind_test.go
@@ -51,5 +51,13 @@ func TestKamelCLIBind(t *testing.T) {
 		t.Run("unsuccessful binding, no property", func(t *testing.T) {
 			Expect(Kamel("bind", "timer-source", "log:info", "-n", ns).Execute()).NotTo(Succeed())
 		})
+
+		t.Run("bind uris", func(t *testing.T) {
+			Expect(Kamel("bind", "timer:foo", "log:bar", "-n", ns).Execute()).To(Succeed())
+			Eventually(IntegrationPodPhase(ns, "timer-to-log"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+			Eventually(IntegrationLogs(ns, "timer-to-log")).Should(ContainSubstring("Body is null"))
+
+			Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
+		})
 	})
 }
diff --git a/e2e/common/files/cron-quartz.yaml b/e2e/common/files/cron-quartz.yaml
index a036b5ceb..6fcce4f73 100644
--- a/e2e/common/files/cron-quartz.yaml
+++ b/e2e/common/files/cron-quartz.yaml
@@ -21,13 +21,13 @@
       uri: "quartz:trigger"
       parameters:
         cron: "0/1 * * * * ?"
-    steps:
-      - set-header:
-          name: "m"
-          constant: "string!"
-      - set-body:
-          simple: "Magic${header.m}"
-      - to: 
-          uri: "log:info"
-          parameters:
-            show-all: "false"
+      steps:
+        - set-header:
+            name: "m"
+            constant: "string!"
+        - set-body:
+            simple: "Magic${header.m}"
+        - to: 
+            uri: "log:info"
+            parameters:
+              show-all: "false"
diff --git a/e2e/common/files/cron-timer.yaml b/e2e/common/files/cron-timer.yaml
index 1b360233a..707d1974c 100644
--- a/e2e/common/files/cron-timer.yaml
+++ b/e2e/common/files/cron-timer.yaml
@@ -21,14 +21,14 @@
       uri: "timer:tick"
       parameters:
         period: "60000"
-    steps:
-      - set-header:
-          name: "m"
-          constant: "string!"
-      - set-body:
-          simple: "Magic${header.m}"
-      - to: 
-          uri: "log:info"
-          parameters:
-            show-all: "false"
+      steps:
+        - set-header:
+            name: "m"
+            constant: "string!"
+        - set-body:
+            simple: "Magic${header.m}"
+        - to: 
+            uri: "log:info"
+            parameters:
+              show-all: "false"
             
\ No newline at end of file
diff --git a/pkg/controller/kameletbinding/integration.go b/pkg/controller/kameletbinding/integration.go
index 1f66e5d8b..ef8b0fc7d 100644
--- a/pkg/controller/kameletbinding/integration.go
+++ b/pkg/controller/kameletbinding/integration.go
@@ -189,14 +189,14 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, kameletbinding *
 	dslSteps = append(dslSteps, s)
 
 	fromWrapper := map[string]interface{}{
-		"uri": from.URI,
+		"uri":   from.URI,
+		"steps": dslSteps,
 	}
 
 	flowRoute := map[string]interface{}{
 		"route": map[string]interface{}{
-			"id":    "binding",
-			"from":  fromWrapper,
-			"steps": dslSteps,
+			"id":   "binding",
+			"from": fromWrapper,
 		},
 	}
 	encodedRoute, err := json.Marshal(flowRoute)


[camel-k] 02/02: fix(e2e): rest yaml definition as Camel 3.15

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

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

commit ad1c373c9c054a20ae4fe1cc7aa56a250a06b6e0
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri May 6 10:43:00 2022 +0200

    fix(e2e): rest yaml definition as Camel 3.15
---
 e2e/common/files/rest-consumer.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/e2e/common/files/rest-consumer.yaml b/e2e/common/files/rest-consumer.yaml
index 2b01f13cf..b7b8e26bb 100644
--- a/e2e/common/files/rest-consumer.yaml
+++ b/e2e/common/files/rest-consumer.yaml
@@ -16,10 +16,9 @@
 # ---------------------------------------------------------------------------
 
 - rest:
-    verb:
-      - method: get
-        uri: "/customers/{name}"
-        to: "direct:start"
+    get:
+      - to: "direct:start"
+        path: "/customers/{name}"
 
 - from:
     uri: "direct:start"