tadayosi commented on code in PR #3871:
URL: https://github.com/apache/camel-k/pull/3871#discussion_r1038914266
##########
e2e/global/knative/knative_test.go:
##########
@@ -107,6 +107,22 @@ func TestKnative(t *testing.T) {
Expect(Kamel("delete", "--all", "-n",
ns).Execute()).To(Succeed())
})
+
+ t.Run("Knative-service disabled", func(t *testing.T) {
+ Expect(KamelRunWithID(operatorID, ns,
"files/http_out.groovy", "-t",
"knative-service.enabled=false").Execute()).To(Succeed())
+ Eventually(IntegrationPodPhase(ns, "http-out"),
TestTimeoutLong).Should(Equal(v1.PodRunning))
+ Eventually(Service(ns, "http-out"),
TestTimeoutShort).ShouldNot(BeNil())
Review Comment:
When you test non existence of some resource it might be more appropriate to
use `Consistently` instead of `Eventually` as `Eventually` should accept
creation of a service for a short while.
##########
e2e/global/knative/files/http_out.groovy:
##########
@@ -0,0 +1,2 @@
+from("rest:get:hello/")
Review Comment:
Pls add license header to every file committed to the repo.
##########
e2e/global/knative/knative_test.go:
##########
@@ -107,6 +107,22 @@ func TestKnative(t *testing.T) {
Expect(Kamel("delete", "--all", "-n",
ns).Execute()).To(Succeed())
})
+
+ t.Run("Knative-service disabled", func(t *testing.T) {
+ Expect(KamelRunWithID(operatorID, ns,
"files/http_out.groovy", "-t",
"knative-service.enabled=false").Execute()).To(Succeed())
+ Eventually(IntegrationPodPhase(ns, "http-out"),
TestTimeoutLong).Should(Equal(v1.PodRunning))
+ Eventually(Service(ns, "http-out"),
TestTimeoutShort).ShouldNot(BeNil())
+ Eventually(KnativeService(ns, "http-out"),
TestTimeoutShort).Should(BeNil())
+ Expect(Kamel("delete", "--all", "-n",
ns).Execute()).To(Succeed())
+ })
+
+ t.Run("Knative-service priority", func(t *testing.T) {
+ Expect(KamelRunWithID(operatorID, ns,
"files/http_out.groovy").Execute()).To(Succeed())
+ Eventually(IntegrationPodPhase(ns, "http-out"),
TestTimeoutLong).Should(Equal(v1.PodRunning))
+ Eventually(KnativeService(ns, "http-out"),
TestTimeoutShort).ShouldNot(BeNil())
Review Comment:
Same here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]