Skip to content

Commit d20f01b

Browse files
author
Jakub Smolar
authored
Merge pull request #597 from jsmolar/jsmolar2
Change prometheus query when getting metrics for limits
2 parents f47d53f + 005da6c commit d20f01b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testsuite/tests/singlecluster/limitador/metrics/test_metrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ def scrape_metrics_created_by_requests(prometheus, pod_monitor, client):
2323

2424

2525
@pytest.mark.parametrize("metric, expected_value", [("authorized_calls", 3), ("limited_calls", 2)])
26-
def test_calls_metric(prometheus, limitador, rate_limit, metric, expected_value, pod_monitor):
26+
def test_calls_metric(prometheus, limitador, route, metric, expected_value, pod_monitor):
2727
"""Tests that `authorized_calls` and `limited_calls` are emitted and correctly incremented"""
2828
metrics = prometheus.get_metrics(
2929
labels={
3030
"pod": limitador.pod.name(),
31-
"limitador_namespace": f"{rate_limit.namespace()}/{rate_limit.name()}",
31+
"limitador_namespace": f"{route.namespace()}/{route.name()}",
3232
"job": f"{pod_monitor.namespace()}/{pod_monitor.name()}",
3333
}
3434
)

0 commit comments

Comments
 (0)