This is an automated email from the ASF dual-hosted git repository. tsato pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit d08e12116e6f8ac36b2edca617a141cccb60c19c Author: Tadayoshi Sato <sato.tadayo...@gmail.com> AuthorDate: Sat Jul 16 00:17:28 2022 +0900 fix(e2e): fix knative test --- e2e/global/knative/knative_test.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/e2e/global/knative/knative_test.go b/e2e/global/knative/knative_test.go index 9185ddf43..3dd55e660 100644 --- a/e2e/global/knative/knative_test.go +++ b/e2e/global/knative/knative_test.go @@ -96,17 +96,6 @@ func TestKnative(t *testing.T) { Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed()) }) - t.Run("Broker", func(t *testing.T) { - Expect(KamelRunWithID(operatorID, ns, "files/knativeevt1.groovy").Execute()).To(Succeed()) - Expect(KamelRunWithID(operatorID, ns, "files/knativeevt2.groovy").Execute()).To(Succeed()) - Eventually(IntegrationPodPhase(ns, "knativeevt1"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - Eventually(IntegrationPodPhase(ns, "knativeevt2"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - Eventually(IntegrationLogs(ns, "knativeevt2"), TestTimeoutMedium).Should(ContainSubstring("Received 1: Hello 1")) - Eventually(IntegrationLogs(ns, "knativeevt2"), TestTimeoutMedium).Should(ContainSubstring("Received 2: Hello 2")) - Eventually(IntegrationLogs(ns, "knativeevt2")).ShouldNot(ContainSubstring("Received 1: Hello 2")) - Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed()) - }) - t.Run("Flow", func(t *testing.T) { Expect(KamelRunWithID(operatorID, ns, "files/flow.yaml").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "flow"), TestTimeoutLong).Should(Equal(v1.PodRunning)) @@ -120,3 +109,18 @@ func TestKnative(t *testing.T) { }) }) } + +func TestRunBroker(t *testing.T) { + WithNewTestNamespaceWithKnativeBroker(t, func(ns string) { + operatorID := fmt.Sprintf("camel-k-%s", ns) + Expect(KamelInstallWithID(operatorID, ns, "--trait-profile", "knative").Execute()).To(Succeed()) + Expect(KamelRunWithID(operatorID, ns, "files/knativeevt1.groovy").Execute()).To(Succeed()) + Expect(KamelRunWithID(operatorID, ns, "files/knativeevt2.groovy").Execute()).To(Succeed()) + Eventually(IntegrationPodPhase(ns, "knativeevt1"), TestTimeoutLong).Should(Equal(v1.PodRunning)) + Eventually(IntegrationPodPhase(ns, "knativeevt2"), TestTimeoutLong).Should(Equal(v1.PodRunning)) + Eventually(IntegrationLogs(ns, "knativeevt2"), TestTimeoutMedium).Should(ContainSubstring("Received 1: Hello 1")) + Eventually(IntegrationLogs(ns, "knativeevt2"), TestTimeoutMedium).Should(ContainSubstring("Received 2: Hello 2")) + Eventually(IntegrationLogs(ns, "knativeevt2")).ShouldNot(ContainSubstring("Received 1: Hello 2")) + Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed()) + }) +}