You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2020/12/10 10:35:34 UTC
[camel-k] 02/02: chore(e2e): suppress Service Monitor creation in
Prometheus test for CI
This is an automated email from the ASF dual-hosted git repository.
tsato pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 8b6243631f3456480dc47239d13bab185a632d0b
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Dec 8 17:16:46 2020 +0900
chore(e2e): suppress Service Monitor creation in Prometheus test for CI
---
e2e/common/prometheus_test.go | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/e2e/common/prometheus_test.go b/e2e/common/prometheus_test.go
index 868309d..fd657ed 100644
--- a/e2e/common/prometheus_test.go
+++ b/e2e/common/prometheus_test.go
@@ -43,9 +43,14 @@ func TestPrometheusTrait(t *testing.T) {
ocp, err := openshift.IsOpenShift(TestClient)
assert.Nil(t, err)
+ // suppress Service Monitor for the time being as CI test runs on OCP 3.11
+ createServiceMonitor := false
+
Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
- Expect(Kamel("run", "-n", ns, "files/Java.java", "-t", "prometheus.enabled=true").Execute()).Should(BeNil())
+ Expect(Kamel("run", "-n", ns, "files/Java.java",
+ "-t", "prometheus.enabled=true",
+ "-t", fmt.Sprintf("prometheus.service-monitor=%v", createServiceMonitor)).Execute()).Should(BeNil())
Eventually(IntegrationPodPhase(ns, "java"), TestTimeoutLong).Should(Equal(v1.PodRunning))
Eventually(IntegrationCondition(ns, "java", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
Eventually(IntegrationLogs(ns, "java"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
@@ -66,7 +71,7 @@ func TestPrometheusTrait(t *testing.T) {
Eventually(service, TestTimeoutShort).ShouldNot(BeNil())
})
- if ocp {
+ if ocp && createServiceMonitor {
t.Run("Service Monitor is created on OpenShift", func(t *testing.T) {
sm := serviceMonitor(ns, "java")
Eventually(sm, TestTimeoutShort).ShouldNot(BeNil())