fix(test): call sync create_app directly in ansible inventory integration test
create_app is synchronous (returns Quart) and runs its own internal asyncio.run for settings/migrations. _make_app wrapped it in asyncio.run, which nested event loops and raised "a coroutine is required" — the other integration tests already call create_app() directly. This test was added in an unpushed commit, so CI never exercised it until now. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,11 @@ _NEEDS_DB = pytest.mark.skipif(
|
|||||||
|
|
||||||
|
|
||||||
def _make_app():
|
def _make_app():
|
||||||
|
# create_app is synchronous and runs its own internal asyncio.run for
|
||||||
|
# settings/migrations — call it directly (matching the other integration
|
||||||
|
# tests); wrapping it in asyncio.run nests event loops and fails.
|
||||||
from steward.app import create_app
|
from steward.app import create_app
|
||||||
import asyncio
|
return create_app(testing=False)
|
||||||
return asyncio.run(create_app(testing=False))
|
|
||||||
|
|
||||||
|
|
||||||
@_NEEDS_DB
|
@_NEEDS_DB
|
||||||
|
|||||||
Reference in New Issue
Block a user