feat(host-agent): start local console by default
Tests / Test passed: 662

This commit is contained in:
2026-07-14 07:31:31 +08:00
parent a166ffd8a4
commit 8b7e5a2800
10 changed files with 101 additions and 152 deletions
+3 -4
View File
@@ -362,7 +362,7 @@ def test_main_task_cancellation_waits_for_active_work_shutdown() -> None:
asyncio.run(scenario())
def test_console_enabled_serves_http_and_shuts_down_cleanly(tmp_path) -> None:
def test_console_serves_http_and_shuts_down_cleanly(tmp_path) -> None:
async def scenario() -> None:
port = _free_loopback_port()
config = HostAgentConfig(
@@ -371,7 +371,6 @@ def test_console_enabled_serves_http_and_shuts_down_cleanly(tmp_path) -> None:
token="secret",
identity_path=tmp_path / "host_identity.json",
local_account_path=tmp_path / "host_local_account.json",
console_enabled=True,
console_bind_host="127.0.0.1",
console_port=port,
)
@@ -449,9 +448,9 @@ def test_console_enabled_serves_http_and_shuts_down_cleanly(tmp_path) -> None:
asyncio.run(scenario())
def test_console_disabled_by_default_opens_no_socket(tmp_path, monkeypatch) -> None:
def test_console_is_created_by_default(tmp_path, monkeypatch) -> None:
monkeypatch.chdir(tmp_path)
application = create_application(config=_config(), manager=DeviceManager())
assert application.console_server is None
assert application.console_server is not None
asyncio.run(application.client.aclose())