docs,config: aggiorna AGENTS.md, config.example, HOST-SETUP.md, checklist faseA e fix vari orchestrator (workstation, build, job, wait, winrm, test)
This commit is contained in:
@@ -96,6 +96,19 @@ def test_get_ip_returns_none_on_failure(monkeypatch: pytest.MonkeyPatch, fake_vm
|
||||
assert backend.get_ip(VmHandle("x.vmx")) is None
|
||||
|
||||
|
||||
def test_get_ip_returns_none_when_tools_not_running(monkeypatch: pytest.MonkeyPatch, fake_vmrun: str) -> None:
|
||||
"""vmrun exits 0 but writes 'Error: ...' to stdout — must return None, not the error string."""
|
||||
monkeypatch.setattr(
|
||||
subprocess,
|
||||
"run",
|
||||
lambda *a, **kw: _make_completed(
|
||||
0, stdout="Error: The VMware Tools are not running in the virtual machine: x.vmx\n"
|
||||
),
|
||||
)
|
||||
backend = WorkstationVmrunBackend(vmrun_path=fake_vmrun)
|
||||
assert backend.get_ip(VmHandle("x.vmx")) is None
|
||||
|
||||
|
||||
def test_get_ip_returns_address(monkeypatch: pytest.MonkeyPatch, fake_vmrun: str) -> None:
|
||||
monkeypatch.setattr(subprocess, "run", lambda *a, **kw: _make_completed(0, stdout="192.168.79.42\n"))
|
||||
backend = WorkstationVmrunBackend(vmrun_path=fake_vmrun)
|
||||
|
||||
Reference in New Issue
Block a user