File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ async def test_create_firecracker_instance(mocker):
63
63
mocker .patch .object (settings , "FAKE_DATA_PROGRAM" , settings .BENCHMARK_FAKE_DATA_PROGRAM )
64
64
mocker .patch .object (settings , "USE_JAILER" , True )
65
65
66
+ # Patch journal.stream so the output of qemu proecss is shown in the test output
67
+ mocker .patch ("aleph.vm.hypervisors.firecracker.microvm.journal.stream" , return_value = None )
66
68
# logging.basicConfig(level=logging.DEBUG)
67
69
68
70
# Ensure that the settings are correct and required files present.
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ async def test_create_qemu_instance(mocker):
60
60
mocker .patch .object (settings , "ENABLE_CONFIDENTIAL_COMPUTING" , False )
61
61
mocker .patch .object (settings , "USE_JAILER" , False )
62
62
63
+ # Patch journal.stream so the output of qemu proecss is shown in the test output
64
+ mocker .patch ("aleph.vm.hypervisors.qemu.qemuvm.journal.stream" , return_value = None )
65
+
63
66
if not settings .FAKE_INSTANCE_BASE .exists ():
64
67
pytest .xfail (
65
68
"Test Runtime not setup. run `cd runtimes/instance-rootfs && sudo ./create-debian-12-qemu-disk.sh`"
@@ -102,6 +105,7 @@ async def test_create_qemu_instance(mocker):
102
105
qemu_execution , process = await mock_systemd_manager .enable_and_start (execution .controller_service )
103
106
assert isinstance (qemu_execution , QemuVM )
104
107
assert qemu_execution .qemu_process is not None
108
+ await asyncio .sleep (30 )
105
109
await mock_systemd_manager .stop_and_disable (execution .vm_hash )
106
110
await qemu_execution .qemu_process .wait ()
107
111
assert qemu_execution .qemu_process .returncode is not None
You can’t perform that action at this time.
0 commit comments