mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix(egress): harden Docker proxy UX and enforcement
This commit is contained in:
parent
4f65d5509f
commit
e433c41014
21 changed files with 537 additions and 42 deletions
|
|
@ -32,6 +32,13 @@ def test_status_command_is_available_in_cli_registry():
|
|||
assert cmd.gateway_only is False
|
||||
|
||||
|
||||
def test_egress_command_is_available_in_cli_registry():
|
||||
cmd = resolve_command("egress")
|
||||
assert cmd is not None
|
||||
assert cmd.gateway_only is False
|
||||
assert "status" in cmd.subcommands
|
||||
|
||||
|
||||
def test_process_command_status_dispatches_without_toggling_status_bar():
|
||||
cli_obj = _make_cli()
|
||||
|
||||
|
|
@ -42,6 +49,20 @@ def test_process_command_status_dispatches_without_toggling_status_bar():
|
|||
assert cli_obj._status_bar_visible is True
|
||||
|
||||
|
||||
def test_process_command_egress_prints_proxy_status(monkeypatch):
|
||||
cli_obj = _make_cli()
|
||||
monkeypatch.setattr(
|
||||
"hermes_cli.proxy_cli.format_status_text",
|
||||
lambda: "Egress proxy status\nEnabled: no",
|
||||
)
|
||||
|
||||
assert cli_obj.process_command("/egress") is True
|
||||
|
||||
cli_obj.console.print.assert_called()
|
||||
printed = "\n".join(str(call.args[0]) for call in cli_obj.console.print.call_args_list)
|
||||
assert "Egress proxy status" in printed
|
||||
|
||||
|
||||
def test_statusbar_still_toggles_visibility():
|
||||
cli_obj = _make_cli()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue