You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/11/05 16:00:20 UTC
[camel-k] branch main updated (bba539c -> 1e0cdb8)
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git.
from bba539c chore(sbo): upgrade Servce Binding Operator to 1.0.0 GA
new 2888b0a Fix #2724: assign an ID to the binding main route
new 1e0cdb8 chore: fix test definition
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/integration_fail_test.go | 1 +
e2e/common/kamelet_binding_test.go | 2 ++
pkg/controller/kameletbinding/common.go | 15 ++++++++++-----
3 files changed, 13 insertions(+), 5 deletions(-)
[camel-k] 01/02: Fix #2724: assign an ID to the binding main route
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 2888b0a166ab931ae2c6ef7deea811108555f490
Author: nicolaferraro <ni...@gmail.com>
AuthorDate: Tue Nov 2 12:19:12 2021 +0100
Fix #2724: assign an ID to the binding main route
---
pkg/controller/kameletbinding/common.go | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/pkg/controller/kameletbinding/common.go b/pkg/controller/kameletbinding/common.go
index 5fd8edb..ea7e3d0 100644
--- a/pkg/controller/kameletbinding/common.go
+++ b/pkg/controller/kameletbinding/common.go
@@ -185,17 +185,22 @@ func createIntegrationFor(ctx context.Context, c client.Client, kameletbinding *
dslSteps = append(dslSteps, s)
- flowFrom := map[string]interface{}{
- "from": map[string]interface{}{
- "uri": from.URI,
+ fromWrapper := map[string]interface{}{
+ "uri": from.URI,
+ }
+
+ flowRoute := map[string]interface{}{
+ "route": map[string]interface{}{
+ "id": "binding",
+ "from": fromWrapper,
"steps": dslSteps,
},
}
- encodedFrom, err := json.Marshal(flowFrom)
+ encodedRoute, err := json.Marshal(flowRoute)
if err != nil {
return nil, err
}
- it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedFrom})
+ it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedRoute})
return &it, nil
}
[camel-k] 02/02: chore: fix test definition
Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 1e0cdb8aaf668de55e11c1365ea732f6257e1ff8
Author: nicolaferraro <ni...@gmail.com>
AuthorDate: Fri Nov 5 11:22:51 2021 +0100
chore: fix test definition
---
e2e/common/integration_fail_test.go | 1 +
e2e/common/kamelet_binding_test.go | 2 ++
2 files changed, 3 insertions(+)
diff --git a/e2e/common/integration_fail_test.go b/e2e/common/integration_fail_test.go
index ee454bc..4d4942c 100644
--- a/e2e/common/integration_fail_test.go
+++ b/e2e/common/integration_fail_test.go
@@ -39,6 +39,7 @@ func TestBadRouteIntegration(t *testing.T) {
Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
t.Run("run bad java route", func(t *testing.T) {
+ RegisterTestingT(t)
name := "bad-route"
Expect(Kamel("run", "-n", ns, "files/BadRoute.java", "--name", name).Execute()).To(Succeed())
Eventually(IntegrationPodPhase(ns, name), TestTimeoutMedium).Should(Equal(corev1.PodRunning))
diff --git a/e2e/common/kamelet_binding_test.go b/e2e/common/kamelet_binding_test.go
index 511b251..f8519d1 100644
--- a/e2e/common/kamelet_binding_test.go
+++ b/e2e/common/kamelet_binding_test.go
@@ -65,6 +65,7 @@ func TestErrorHandler(t *testing.T) {
}}}
t.Run("throw error test", func(t *testing.T) {
+ RegisterTestingT(t)
Expect(BindKameletToWithErrorHandler(ns, "throw-error-binding", from, to, map[string]string{"message": "throw Error"}, map[string]string{"loggerName": "integrationLogger"}, errorHandler)()).To(Succeed())
@@ -75,6 +76,7 @@ func TestErrorHandler(t *testing.T) {
})
t.Run("don't throw error test", func(t *testing.T) {
+ RegisterTestingT(t)
Expect(BindKameletToWithErrorHandler(ns, "no-error-binding", from, to, map[string]string{"message": "true"}, map[string]string{"loggerName": "integrationLogger"}, errorHandler)()).To(Succeed())