Finalize guest boot and exec runtime updates
This commit is contained in:
parent
23a2dfb330
commit
1b19bff7b6
7 changed files with 198 additions and 8 deletions
21
tests/test_runtime_boot_check.py
Normal file
21
tests/test_runtime_boot_check.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pyro_mcp.runtime_boot_check import _classify_result
|
||||
|
||||
|
||||
def test_classify_result_reports_kernel_panic() -> None:
|
||||
reason = _classify_result(
|
||||
firecracker_log="Successfully started microvm",
|
||||
serial_log="Kernel panic - not syncing: VFS: Unable to mount root fs",
|
||||
vm_alive=False,
|
||||
)
|
||||
assert reason == "guest kernel panic during boot"
|
||||
|
||||
|
||||
def test_classify_result_reports_success_when_vm_stays_alive() -> None:
|
||||
reason = _classify_result(
|
||||
firecracker_log="Successfully started microvm",
|
||||
serial_log="boot log",
|
||||
vm_alive=True,
|
||||
)
|
||||
assert reason is None
|
||||
Loading…
Add table
Add a link
Reference in a new issue