This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 3b3d5132bfd7ff494a96734130494a5f2d26ff93
Author: Lukas Lowinger <llowi...@redhat.com>
AuthorDate: Tue Nov 24 18:05:40 2020 +0100

    [ENTESB-14497] Provide tests for basic Operator metrics
---
 e2e/yaks/openshift/monitoring/metrics.feature  | 20 ++++++++++++++++++++
 e2e/yaks/openshift/monitoring/yaks-config.yaml |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/e2e/yaks/openshift/monitoring/metrics.feature 
b/e2e/yaks/openshift/monitoring/metrics.feature
index 3b28f59..e4657b0 100644
--- a/e2e/yaks/openshift/monitoring/metrics.feature
+++ b/e2e/yaks/openshift/monitoring/metrics.feature
@@ -27,3 +27,23 @@ Feature: Camel K can serve metrics to Prometheus
       | $.data.result[0].metric.pod      | @startsWith('metrics')@             
            |
       | $.data.result[0].value[1]        | @isNumber()@                        
            |
     And receive HTTP 200
+
+  Scenario: Thanos is able to serve integration build metrics from Operator
+    Given HTTP request header Authorization is "Bearer ${openshift.token}"
+    When send GET /api/v1/query?query=camel_k_build_duration_seconds_sum
+    Then verify HTTP response expressions
+      | $.status                                                               
     | success                            |
+      | $.data.result[?(@.metric.namespace == '${YAKS_NAMESPACE}' && 
@.metric.result == 'Succeeded')].metric.__name__ | 
camel_k_build_duration_seconds_sum |
+      | $.data.result[?(@.metric.namespace == '${YAKS_NAMESPACE}' && 
@.metric.result == 'Succeeded')].metric.pod      | 
@startsWith('camel-k-operator')@   |
+      | $.data.result[?(@.metric.namespace == '${YAKS_NAMESPACE}' && 
@.metric.result == 'Succeeded')].value[1]        | @greaterThan(10)@            
      |
+    And receive HTTP 200
+
+  Scenario: Thanos is able to serve integration readiness metrics from Operator
+    Given HTTP request header Authorization is "Bearer ${openshift.token}"
+    When send GET 
/api/v1/query?query=camel_k_integration_first_readiness_seconds_sum
+    Then verify HTTP response expressions
+      | $.status                                                               
     | success                                         |
+      | $.data.result[?(@.metric.namespace == 
'${YAKS_NAMESPACE}')].metric.__name__ | 
camel_k_integration_first_readiness_seconds_sum |
+      | $.data.result[?(@.metric.namespace == '${YAKS_NAMESPACE}')].metric.pod 
     | @startsWith('camel-k-operator')@                |
+      | $.data.result[?(@.metric.namespace == '${YAKS_NAMESPACE}')].value[1]   
     | @greaterThan(5)@                               |
+    And receive HTTP 200
\ No newline at end of file
diff --git a/e2e/yaks/openshift/monitoring/yaks-config.yaml 
b/e2e/yaks/openshift/monitoring/yaks-config.yaml
index 5f26519..ed57176 100644
--- a/e2e/yaks/openshift/monitoring/yaks-config.yaml
+++ b/e2e/yaks/openshift/monitoring/yaks-config.yaml
@@ -23,7 +23,7 @@ pre:
     script: ./obtainToken.sh
   - name: Camel-k install
     run: |
-      kamel install -w -n ${YAKS_NAMESPACE}
+      kamel install -w -n ${YAKS_NAMESPACE} --monitoring=true
   - name: Dependency install
     script: ./dependencyInstall.sh
   - name: Integration run

Reply via email to