From 2fd84f487d25dc976587270fcda634f5560a7083 Mon Sep 17 00:00:00 2001 From: Tal Borenstein Date: Wed, 4 Dec 2024 18:05:10 +0200 Subject: [PATCH] fix: tests --- tests/test_provisioning.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_provisioning.py b/tests/test_provisioning.py index 6603f6bf8..679c9b75d 100644 --- a/tests/test_provisioning.py +++ b/tests/test_provisioning.py @@ -141,6 +141,11 @@ def test_reprovision_workflow(monkeypatch, db_session, client, test_app): for event_handler in app.router.on_startup: asyncio.run(event_handler()) + # manually trigger the provision resources + from keep.api.config import provision_resources + + provision_resources() + client = TestClient(get_app()) response = client.get("/workflows", headers={"x-api-key": "someapikey"}) @@ -210,6 +215,11 @@ def test_reprovision_provider(monkeypatch, db_session, client, test_app): for event_handler in app.router.on_startup: asyncio.run(event_handler()) + # manually trigger the provision resources + from keep.api.config import provision_resources + + provision_resources() + client = TestClient(app) # Step 3: Verify if the new provider is provisioned after reloading @@ -293,6 +303,11 @@ def test_reprovision_dashboard(monkeypatch, db_session, client, test_app): for event_handler in app.router.on_startup: asyncio.run(event_handler()) + # manually trigger the provision resources + from keep.api.config import provision_resources + + provision_resources() + client = TestClient(app) # Step 3: Verify if the new dashboard is provisioned after reloading