From f3cfb896123f6e8cf4e8dd98c4de682e8dc80dbe Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 14 Oct 2026 15:56:45 -0400 Subject: [PATCH] test(traefik): mount the plugin's routes in the route test (#5741) #5741 "Traefik routers are graded against their own normal". CI run 9126: the new route test got 404, because CI doesn't enable the Traefik plugin (enabling it would start its scraper against the shared database). The test now mounts traefik_bp on its own app, as plugin_manager.load_plugins does, with the plugin.yaml scrape interval. Co-Authored-By: Claude Opus 5.5 --- tests/integration/test_traefik_latest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration/test_traefik_latest.py b/tests/integration/test_traefik_latest.py index 08893b6..0016bde 100644 --- a/tests/integration/test_traefik_latest.py +++ b/tests/integration/test_traefik_latest.py @@ -225,6 +225,12 @@ def test_the_page_grades_a_router_against_its_normal_and_lists_its_anomalies(app return (rows.status_code, await rows.get_data(as_text=True), widget.status_code, await widget.get_data(as_text=True)) + # CI doesn't enable the plugin (it would start scraping), so mount its + # blueprint here the way plugin_manager.load_plugins does. + from plugins.traefik.routes import traefik_bp + app.register_blueprint(traefik_bp, url_prefix="/plugins/traefik") + app.config["PLUGINS"].setdefault("traefik", {"enabled": True, "scrape_interval_seconds": 60}) + rows_status, page, widget_status, widget = asyncio.run(go()) assert rows_status == 200 and widget_status == 200 assert "4xx 60.0% is usual 58.0% at this hour" in page # healthy, and says why