(hq_env: HqEnv)
| 408 | |
| 409 | |
| 410 | def test_deploy_ssh_custom_port(hq_env: HqEnv): |
| 411 | hq_env.start_server() |
| 412 | path = "nodefile.txt" |
| 413 | with open(path, "w") as f: |
| 414 | print("localhost:1234", file=f) |
| 415 | |
| 416 | with hq_env.mock.mock_program_with_code("ssh", ssh_code_dump_args_to_file("command.txt")) as mock: |
| 417 | hq_env.command(["worker", "deploy-ssh", path]) |
| 418 | with open("command.txt") as f: |
| 419 | cmdline = json.load(f) |
| 420 | cmdline = cmdline[: cmdline.index("--")] |
| 421 | assert cmdline == [str(mock), "localhost", "-t", "-t", "-p", "1234"] |
| 422 | |
| 423 | |
| 424 | def prepare_localhost_nodefile(count: int = 1) -> str: |
nothing calls this directly
no test coverage detected