Unify public UX around pyro CLI and Pyro facade
This commit is contained in:
parent
d16aadd03f
commit
23a2dfb330
19 changed files with 936 additions and 407 deletions
|
|
@ -107,7 +107,7 @@ def test_vm_manager_reaps_started_vm(tmp_path: Path) -> None:
|
|||
({"vcpu_count": 1, "mem_mib": 512, "ttl_seconds": 30}, "ttl_seconds must be between"),
|
||||
],
|
||||
)
|
||||
def test_vm_manager_validates_limits(tmp_path: Path, kwargs: dict[str, int], msg: str) -> None:
|
||||
def test_vm_manager_validates_limits(tmp_path: Path, kwargs: dict[str, Any], msg: str) -> None:
|
||||
manager = VmManager(
|
||||
backend_name="mock",
|
||||
base_dir=tmp_path / "vms",
|
||||
|
|
@ -188,6 +188,25 @@ def test_vm_manager_network_info(tmp_path: Path) -> None:
|
|||
assert info["network_enabled"] is False
|
||||
|
||||
|
||||
def test_vm_manager_run_vm(tmp_path: Path) -> None:
|
||||
manager = VmManager(
|
||||
backend_name="mock",
|
||||
base_dir=tmp_path / "vms",
|
||||
network_manager=TapNetworkManager(enabled=False),
|
||||
)
|
||||
result = manager.run_vm(
|
||||
profile="debian-base",
|
||||
command="printf 'ok\\n'",
|
||||
vcpu_count=1,
|
||||
mem_mib=512,
|
||||
timeout_seconds=30,
|
||||
ttl_seconds=600,
|
||||
network=False,
|
||||
)
|
||||
assert int(result["exit_code"]) == 0
|
||||
assert str(result["stdout"]) == "ok\n"
|
||||
|
||||
|
||||
def test_vm_manager_firecracker_backend_path(
|
||||
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue