mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
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:
@@ -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"}'
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user