Skip to content

Commit c7db4ef

Browse files
committed
Fix: Pytest did not test legacy diagnostic
1 parent fe9235a commit c7db4ef

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/supervisor/test_execution.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ async def test_create_execution():
5858

5959

6060
@pytest.mark.asyncio
61-
async def test_create_execution_online():
61+
async def test_create_execution_online(vm_hash: ItemHash = None):
6262
"""
6363
Create a new VM execution without building it locally and check that it starts properly.
6464
"""
6565

66+
vm_hash = vm_hash or settings.CHECK_FASTAPI_VM_ID
67+
6668
# Ensure that the settings are correct and required files present.
6769
settings.setup()
6870
settings.check()
@@ -71,7 +73,6 @@ async def test_create_execution_online():
7173
engine = metrics.setup_engine()
7274
await metrics.create_tables(engine)
7375

74-
vm_hash = ItemHash("3fc0aa9569da840c43e7bd2033c3c580abb46b007527d6d20f2d4e98e867f7af")
7576
message = await get_message(ref=vm_hash)
7677

7778
execution = VmExecution(
@@ -93,3 +94,11 @@ async def test_create_execution_online():
9394

9495
await execution.start()
9596
await execution.stop()
97+
98+
99+
@pytest.mark.asyncio
100+
async def test_create_execution_legacy():
101+
"""
102+
Create a new VM execution based on the legacy FastAPI check and ensure that it starts properly.
103+
"""
104+
await test_create_execution_online(vm_hash=settings.LEGACY_CHECK_FASTAPI_VM_ID)

0 commit comments

Comments
 (0)