diff --git a/test/resources/prometheus.py b/test/resources/prometheus.py index ae61203049..9f30fab4d4 100644 --- a/test/resources/prometheus.py +++ b/test/resources/prometheus.py @@ -26,13 +26,6 @@ def check_prometheus_query(host: str, port: int, query: str) -> None: raise Exception("Prometheus query returned no results") -def check_prometheus_query_is_missing(host: str, port: int, query: str) -> None: - response = _run_prometheus_query(host, port, query) - data_result_list: list = response.json().get("data", {}).get("result") - if data_result_list and len(data_result_list) > 0: - raise Exception("Prometheus query returned results") - - def check_prometheus_exporter(host: str, port: int, query: str) -> None: """Check the metric is available int Prometheus Exporter Fails if the response is empty.""" diff --git a/test/suites/telemetry/telemetry.robot b/test/suites/telemetry/telemetry.robot index 69f938c636..3cd96ae12d 100644 --- a/test/suites/telemetry/telemetry.robot +++ b/test/suites/telemetry/telemetry.robot @@ -72,22 +72,13 @@ MicroShift Reports Metrics To Default Server Through Proxy MicroShift Fails to Report Metrics To Prometheus Server With Telemetry Disabled [Documentation] Check MicroShift is not able to send metrics to the telemetry server when it is disabled. [Setup] Run Keywords - ... Start Prometheus Server ${PROMETHEUS_PORT} - ... AND ... Setup Telemetry Configuration ${DISABLE_TELEMETRY_TO_PROMETHEUS} ${PULL_SECRET_METRICS} Should Find Metrics In Journal Log Success Telemetry is disabled Should Find Metrics In Journal Log Fails Metrics sent successfully - @{metrics_to_check}= Get List Prometheus Metrics To Check - FOR ${metric} IN @{metrics_to_check} - Check Prometheus Query Is Missing ${PROMETHEUS_HOST} ${PROMETHEUS_PORT} ${metric} - END - [Teardown] Run Keywords ... Remove Telemetry Configuration - ... AND - ... Stop Prometheus Server ${PROMETHEUS_PORT} MicroShift Fails to Report Metrics To Default Server With Wrong Pull Secret [Documentation] Check MicroShift is not able to send metrics to the telemetry server when the pull secret is wrong.