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

Function test_job_shell_script_fail_not_executable

tests/test_job.py:908–918  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

906
907
908def test_job_shell_script_fail_not_executable(hq_env: HqEnv):
909 hq_env.start_server()
910 hq_env.start_worker()
911 Path("test.sh").write_text("""echo 'Hello' > out.txt""")
912 hq_env.command(["submit", "./test.sh"])
913 wait_for_job_state(hq_env, 1, "FAILED")
914
915 table = hq_env.command(["task", "list", "1", "-v"], as_table=True)
916 assert """Cannot execute "./test.sh": Permission denied (os error 13)
917The script that you have tried to execute (`./test.sh`) is not executable.
918Try making it executable or add a shebang line to it.""" == table.get_column_value("Error")[0]
919
920
921def test_job_shell_script_read_interpreter(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

wait_for_job_stateFunction · 0.85
commandMethod · 0.80
get_column_valueMethod · 0.80
start_serverMethod · 0.45
start_workerMethod · 0.45

Tested by

no test coverage detected