Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-4195

MTT: TestCustomPrometheus print more information on failure

XMLWordPrintable

      We have a run with failure for this test and will be good to be able to track better what fails. The failure came from this section of the code:

      		t.LogStep("Testing if 'istio_requests_total' metric is available through Prometheus API")
      		retry.UntilSuccess(t, func(t test.TestHelper) {
      			resp := prometheus.CustomPrometheus.Query(t, customPrometheusNs,
      				fmt.Sprintf(`istio_requests_total{namespace="%s",container="istio-proxy",source_app="istio-ingressgateway",destination_app="productpage"}`, ns.Bookinfo))
      
      			if len(resp.Data.Result) == 0 {
      				t.Errorf("No data points received from Prometheus API")
      			}
      		})
      

      We need to investigate when it fails after the retries if the is a way to log the output of the response to have the failure or at least the message

            frherrer@redhat.com Francisco Herrera Lira
            frherrer@redhat.com Francisco Herrera Lira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: