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

Function test_deploy_ssh_custom_port

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

Source from the content-addressed store, hash-verified

408
409
410def 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
424def prepare_localhost_nodefile(count: int = 1) -> str:

Callers

nothing calls this directly

Calls 6

commandMethod · 0.80
loadMethod · 0.80
indexMethod · 0.80
start_serverMethod · 0.45

Tested by

no test coverage detected