mirror of
https://github.com/prometheus/prometheus
synced 2026-04-21 07:00:27 +08:00
When health_filter is set without explicit services, the catalog needs to be watched to enumerate services. Add watchedFilter to the condition that triggers catalog watching. Improve the filter test suite: - Replace defer with t.Cleanup for stub servers. - Rewrite TestFilterOption to assert that the catalog receives the filter and the health endpoint does not. - Rewrite TestHealthFilterOption to assert that health_filter is routed correctly to the health endpoint only. - Add TestBothFiltersOption to verify both filters are routed to their respective endpoints when both are configured. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>