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 2026/08/25 12:39:32 UTC

(camel-k) branch main updated: chore(e2e): bind condition status

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

squakez 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 2619cbb13 chore(e2e): bind condition status
2619cbb13 is described below

commit 2619cbb13553d78bdb7dc7e324b02c44892f0f2e
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Tue Aug 25 08:27:12 2026 +0200

    chore(e2e): bind condition status
---
 e2e/common/cli/bind_test.go | 24 ++++++++++++++----------
 e2e/support/test_support.go | 10 ----------
 2 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/e2e/common/cli/bind_test.go b/e2e/common/cli/bind_test.go
index 2971317ce..44170d35f 100644
--- a/e2e/common/cli/bind_test.go
+++ b/e2e/common/cli/bind_test.go
@@ -31,6 +31,7 @@ import (
 	. "github.com/onsi/gomega"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
 func TestKamelCLIBind(t *testing.T) {
@@ -40,22 +41,25 @@ func TestKamelCLIBind(t *testing.T) {
 		g.Expect(CreateTimerKamelet(t, ctx, ns, kameletName)()).To(Succeed())
 
 		t.Run("bind timer to log", func(t *testing.T) {
+			pipeName := "test-timer-source-to-log"
 			g.Expect(KamelBind(t, ctx, ns, kameletName, "log:info", "-p", "source.message=helloTest").Execute()).To(Succeed())
-			g.Eventually(IntegrationPodPhase(t, ctx, ns, "test-timer-source-to-log"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-			g.Eventually(IntegrationLogs(t, ctx, ns, "test-timer-source-to-log")).Should(ContainSubstring("Body: helloTest"))
-			g.Expect(KamelBind(t, ctx, ns, "test-timer-source", "log:info", "-p", "source.message=newText").Execute()).To(Succeed())
-			g.Eventually(IntegrationLogs(t, ctx, ns, "test-timer-source-to-log")).Should(ContainSubstring("Body: newText"))
+			g.Eventually(IntegrationConditionStatus(t, ctx, ns, pipeName, v1.IntegrationConditionReady), TestTimeoutMedium).
+				Should(Equal(corev1.ConditionTrue))
+			g.Eventually(IntegrationPodPhase(t, ctx, ns, pipeName)).Should(Equal(corev1.PodRunning))
+			g.Eventually(IntegrationLogs(t, ctx, ns, pipeName)).Should(ContainSubstring("Body: helloTest"))
+
+			g.Expect(KamelBind(t, ctx, ns, kameletName, "log:info", "-p", "source.message=newText").Execute()).To(Succeed())
+			g.Eventually(IntegrationConditionStatus(t, ctx, ns, pipeName, v1.IntegrationConditionReady), TestTimeoutMedium).
+				Should(Equal(corev1.ConditionTrue))
+			g.Eventually(IntegrationLogs(t, ctx, ns, pipeName)).Should(ContainSubstring("Body: newText"))
 		})
 
 		t.Run("bind uris", func(t *testing.T) {
 			g.Expect(KamelBind(t, ctx, ns, "timer:foo", "log:bar").Execute()).To(Succeed())
-			g.Eventually(IntegrationPodPhase(t, ctx, ns, "timer-to-log"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+			g.Eventually(IntegrationConditionStatus(t, ctx, ns, "timer-to-log", v1.IntegrationConditionReady), TestTimeoutMedium).
+				Should(Equal(corev1.ConditionTrue))
+			g.Eventually(IntegrationPodPhase(t, ctx, ns, "timer-to-log")).Should(Equal(corev1.PodRunning))
 			g.Eventually(IntegrationLogs(t, ctx, ns, "timer-to-log")).Should(ContainSubstring("Body is null"))
 		})
-
-		t.Run("bind with custom SA", func(t *testing.T) {
-			g.Expect(KamelBind(t, ctx, ns, "timer:foo", "log:bar", "--service-account", "my-service-account").Execute()).To(Succeed())
-			g.Eventually(IntegrationSpecSA(t, ctx, ns, "timer-to-log")).Should(Equal("my-service-account"))
-		})
 	})
 }
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 4158b0a08..dab27c050 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -870,16 +870,6 @@ func IntegrationStatusCapabilities(t *testing.T, ctx context.Context, ns string,
 	}
 }
 
-func IntegrationSpecSA(t *testing.T, ctx context.Context, ns string, name string) func() string {
-	return func() string {
-		it := Integration(t, ctx, ns, name)()
-		if it == nil {
-			return ""
-		}
-		return it.Spec.ServiceAccountName
-	}
-}
-
 func IntegrationKitName(t *testing.T, ctx context.Context, ns string, name string) func() string {
 	return func() string {
 		it := Integration(t, ctx, ns, name)()