Skip to content

Commit

Permalink
Add e2e test for knative service trait with annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
lfabriko authored and squakez committed Nov 3, 2023
1 parent 4da8e53 commit 1dea230
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions e2e/knative/knative_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1dea230

Please sign in to comment.