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

Function test_worker_wrap_cmd

tests/autoalloc/test_autoalloc.py:636–653  ·  view source on GitHub ↗
(hq_env: HqEnv, flavor: ManagerFlavor)

Source from the content-addressed store, hash-verified

634
635@all_flavors
636def test_worker_wrap_cmd(hq_env: HqEnv, flavor: ManagerFlavor):
637 manager = ExtractSubmitScriptPath(flavor.create_adapter())
638
639 with MockJobManager(hq_env, manager):
640 start_server_with_quick_refresh(hq_env)
641 prepare_tasks(hq_env)
642
643 add_queue(
644 hq_env,
645 manager=flavor.manager_type(),
646 wrap_cmd="podman run myimage",
647 )
648
649 script = manager.get_script_path()
650 assert normalize_output(hq_env, flavor.manager_type(), get_exec_line(script)) == snapshot(
651 'RUST_LOG=tako=trace,hyperqueue=trace podman run myimage <hq-binary> worker start --idle-timeout "5m" --manager'
652 ' "<manager>" --server-dir "<server-dir>/001" --on-server-lost "finish-running" --time-limit "1h"'
653 )

Callers

nothing calls this directly

Calls 10

get_script_pathMethod · 0.95
MockJobManagerClass · 0.85
prepare_tasksFunction · 0.85
normalize_outputFunction · 0.85
get_exec_lineFunction · 0.85
add_queueFunction · 0.70
create_adapterMethod · 0.45
manager_typeMethod · 0.45

Tested by

no test coverage detected