MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_deploy_ssh_worker_command

Function test_deploy_ssh_worker_command

tests/test_worker.py:355–364  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

353
354
355def 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
367def test_deploy_ssh_wait_for_worker(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 8

commandMethod · 0.80
loadMethod · 0.80
indexMethod · 0.80
get_hq_binaryFunction · 0.70
start_serverMethod · 0.45

Tested by

no test coverage detected