From 6c4cb2485de51f42e2d264a9a14f6bc75ccc0629 Mon Sep 17 00:00:00 2001 From: RaresKeY <158580472+RaresKeY@users.noreply.github.com> Date: Sat, 18 Jul 2026 13:07:48 +0200 Subject: [PATCH] test(cookbook): cover adopt remote host validation (#5225) --- tests/test_codex_ssh_host_validation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_codex_ssh_host_validation.py b/tests/test_codex_ssh_host_validation.py index b4c07f1b7..80f918d47 100644 --- a/tests/test_codex_ssh_host_validation.py +++ b/tests/test_codex_ssh_host_validation.py @@ -199,7 +199,8 @@ async def test_documents_pagination_out_of_range_offset_returns_empty_page(): assert result["next_offset"] is None -def test_adopt_rejects_ssh_option_host_before_shell(monkeypatch): +@pytest.mark.parametrize("host_field", ["host", "remote_host"]) +def test_adopt_rejects_ssh_option_host_before_shell(monkeypatch, host_field): calls = [] async def fail_if_shell_runs(*args, **kwargs): @@ -212,7 +213,7 @@ def test_adopt_rejects_ssh_option_host_before_shell(monkeypatch): body = { "tmux_session": "serve_abc123", "model": "org/model", - "host": "-oProxyCommand=sh", + host_field: "-oProxyCommand=sh", } with pytest.raises(HTTPException) as exc: