Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions test/resources/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
9 changes: 0 additions & 9 deletions test/suites/telemetry/telemetry.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down