pyro-mcp/tests/test_runtime_boot_check.py

21 lines
649 B
Python

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