nixosTests.prometheus-exporters.smokeping: fix test after 0.10.0

prometheus-smokeping-prober was updated to 0.10.0 in #396980
which introduced a new label `tos` in its metrics.
add it to the failing tests to make them match
the expected metric (and pass) again

you could argue that the tests are a bit too greedy with the way
they match metrics, but I actually like it that way
This commit is contained in:
Willy
2025-08-20 16:40:32 +02:00
parent 9670af4242
commit 2103ba2688

View File

@@ -1603,12 +1603,12 @@ let
wait_for_open_port(9374)
wait_until_succeeds(
"curl -sSf localhost:9374/metrics | grep '{}' | grep -v ' 0$'".format(
'smokeping_requests_total{host="127.0.0.1",ip="127.0.0.1",source=""} '
'smokeping_requests_total{host="127.0.0.1",ip="127.0.0.1",source="",tos="0"} '
)
)
wait_until_succeeds(
"curl -sSf localhost:9374/metrics | grep '{}'".format(
'smokeping_response_ttl{host="127.0.0.1",ip="127.0.0.1",source=""}'
'smokeping_response_ttl{host="127.0.0.1",ip="127.0.0.1",source="",tos="0"}'
)
)
'';