fix(test): call sync create_app directly in ansible inventory integration test
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 7s
CI / integration (push) Successful in 2m18s
CI / publish (push) Successful in 1m7s

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:
2026-06-15 21:39:41 -04:00
parent b49496b57b
commit 67a1bc740d
+4 -2
View File
@@ -20,9 +20,11 @@ _NEEDS_DB = pytest.mark.skipif(
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
import asyncio
return asyncio.run(create_app(testing=False))
return create_app(testing=False)
@_NEEDS_DB