(hq_env: HqEnv)
| 353 | |
| 354 | |
| 355 | def test_deploy_ssh_worker_command(hq_env: HqEnv): |
| 356 | hq_env.start_server() |
| 357 | with hq_env.mock.mock_program_with_code("ssh", ssh_code_dump_args_to_file("command.txt")): |
| 358 | nodefile = prepare_localhost_nodefile() |
| 359 | hq_env.command(["worker", "deploy-ssh", "--show-output", nodefile, "--time-limit", "3s"]) |
| 360 | with open("command.txt") as f: |
| 361 | cmdline = json.load(f) |
| 362 | cmdline = cmdline[cmdline.index("--") + 1 :] |
| 363 | cmdline = [c.replace(get_hq_binary(), "<hq-binary>") for c in cmdline] |
| 364 | assert cmdline == ["<hq-binary>", "worker", "start", "--time-limit", "3s"] |
| 365 | |
| 366 | |
| 367 | def test_deploy_ssh_wait_for_worker(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected