mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
feat(toolchain): flag + WorkSession toolchain columns + migration
ROBOCO_TOOLCHAIN_MATCH_ENABLED (default-off) gates the whole subsystem. Adds work_sessions.toolchain_python / toolchain_status (nullable VARCHAR(20)) recording the interpreter the workspace was provisioned with and whether the target's suite can be executed (ok | broken | unknown). Migration 042 verified with a real upgrade head + downgrade -1 + re-upgrade on a throwaway Postgres.
This commit is contained in:
@@ -440,6 +440,19 @@ def _seed_ws(setup: dict, **kwargs: Any) -> WorkSessionTable:
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_worksession_toolchain_columns_round_trip(
|
||||
ws_client: dict, db_session: AsyncSession
|
||||
) -> None:
|
||||
"""The toolchain_python / toolchain_status columns persist + round-trip."""
|
||||
ws = _seed_ws(ws_client, toolchain_python="3.14", toolchain_status="ok")
|
||||
db_session.add(ws)
|
||||
await db_session.flush()
|
||||
await db_session.refresh(ws)
|
||||
assert ws.toolchain_python == "3.14"
|
||||
assert ws.toolchain_status == "ok"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_session_by_id_seeded(
|
||||
ws_client: dict, db_session: AsyncSession
|
||||
|
||||
Reference in New Issue
Block a user