mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-18 02:35:23 -04:00
fix(cookbook): harden remote serve host handling (#4345)
This commit is contained in:
@@ -68,6 +68,14 @@ def test_valid_remote_builds_port_flag():
|
||||
assert port_flag == "-p 2222 "
|
||||
|
||||
|
||||
def test_integer_ssh_port_in_stored_task_normalizes_without_crashing():
|
||||
host, port_flag = codex_routes._ssh_prefix_for_task(
|
||||
{"remoteHost": "user@box", "sshPort": 2222}
|
||||
)
|
||||
assert host == "user@box"
|
||||
assert port_flag == "-p 2222 "
|
||||
|
||||
|
||||
def test_default_ssh_port_omits_flag():
|
||||
host, port_flag = codex_routes._ssh_prefix_for_task(
|
||||
{"remoteHost": "box", "sshPort": "22"}
|
||||
|
||||
Reference in New Issue
Block a user