Skip to content

Self-hosted AI workspace.

Python

test(cookbook): cover adopt remote host validation (#5225)

RaresKeY5f481e7db170
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):
[email protected]("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: