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

acosentino pushed a commit to branch release-1.9.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit e849377b52da01786a97ec957a5d64a451e7ebff
Author: Pasquale Congiusti <[email protected]>
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)

Reply via email to