Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Dec 4, 2024
1 parent 37c7984 commit 2fd84f4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2fd84f4

Please sign in to comment.