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 2023/12/01 15:08:41 UTC
(camel-k) branch main updated: chore(test): Health kamelet test cleanup
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
The following commit(s) were added to refs/heads/main by this push:
new fffd6c749 chore(test): Health kamelet test cleanup
fffd6c749 is described below
commit fffd6c749a1b55ca4c6f299fdfb9e175fb55af8e
Author: Gaelle Fournier <ga...@gmail.com>
AuthorDate: Wed Nov 29 18:07:31 2023 +0100
chore(test): Health kamelet test cleanup
Ref #4922
---
e2e/common/traits/health_test.go | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index 40575b5c8..0d4656b4d 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -25,11 +25,12 @@ package traits
import (
"encoding/json"
"fmt"
- "github.com/onsi/gomega/gstruct"
"strings"
"testing"
"time"
+ "github.com/onsi/gomega/gstruct"
+
camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
. "github.com/onsi/gomega"
@@ -237,13 +238,15 @@ func TestHealthTrait(t *testing.T) {
t.Run("Readiness condition with stopped binding", func(t *testing.T) {
name := RandomizedSuffixName("stopped-binding")
+ source := RandomizedSuffixName("my-health-timer-source")
+ sink := RandomizedSuffixName("my-health-log-sink")
- Expect(CreateTimerKamelet(ns, "my-health-timer-source")()).To(Succeed())
- Expect(CreateLogKamelet(ns, "my-health-log-sink")()).To(Succeed())
+ Expect(CreateTimerKamelet(ns, source)()).To(Succeed())
+ Expect(CreateLogKamelet(ns, sink)()).To(Succeed())
Expect(KamelBindWithID(operatorID, ns,
- "my-health-timer-source",
- "my-health-log-sink",
+ source,
+ sink,
"-p", "source.message=Magicstring!",
"-p", "sink.loggerName=binding",
"--annotation", "trait.camel.apache.org/health.enabled=true",
@@ -354,6 +357,8 @@ func TestHealthTrait(t *testing.T) {
// Clean-up
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
+ Expect(DeleteKamelet(ns, source)).To(Succeed())
+ Expect(DeleteKamelet(ns, sink)).To(Succeed())
})
t.Run("Readiness condition with never ready route", func(t *testing.T) {