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 1dea230a7 Add e2e test for knative service trait with annotation
1dea230a7 is described below

commit 1dea230a701cd3df75679db2444362f41d2ee281
Author: Lucie Krejcirova <[email protected]>
AuthorDate: Fri Nov 3 10:07:20 2023 +0100

    Add e2e test for knative service trait with annotation
---
 e2e/knative/knative_test.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/e2e/knative/knative_test.go b/e2e/knative/knative_test.go
index 241940efd..56ce5d5ec 100644
--- a/e2e/knative/knative_test.go
+++ b/e2e/knative/knative_test.go
@@ -123,6 +123,17 @@ func TestKnative(t *testing.T) {
                Eventually(KnativeService(ns, "http-out"), 
TestTimeoutShort).ShouldNot(BeNil())
                Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
        })
+
+       t.Run("Knative-service annotation", func(t *testing.T) {
+               Expect(KamelRunWithID(operatorID, ns, "files/knative2.groovy",
+                       "-t", 
"knative-service.annotations.'haproxy.router.openshift.io/balance'=roundrobin").Execute()).To(Succeed())
+               Eventually(IntegrationPodPhase(ns, "knative2"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
+               Eventually(KnativeService(ns, "knative2"), 
TestTimeoutShort).ShouldNot(BeNil())
+               ks := KnativeService(ns, "knative2")()
+               annotations := ks.ObjectMeta.Annotations
+               
Expect(annotations["haproxy.router.openshift.io/balance"]).To(Equal("roundrobin"))
+               Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+       })
 }
 
 func TestRunBroker(t *testing.T) {

Reply via email to