(hq_env: HqEnv)
| 967 | |
| 968 | |
| 969 | def test_custom_error_message(hq_env: HqEnv): |
| 970 | hq_env.start_server() |
| 971 | hq_env.start_worker() |
| 972 | |
| 973 | hq_env.command( |
| 974 | [ |
| 975 | "submit", |
| 976 | "--task-dir", |
| 977 | "--", |
| 978 | "bash", |
| 979 | "-c", |
| 980 | # "echo $HQ_ERROR", |
| 981 | "echo 'Testing message' > \"${HQ_ERROR_FILENAME}\"; exit 1", |
| 982 | ] |
| 983 | ) |
| 984 | wait_for_job_state(hq_env, 1, "FAILED") |
| 985 | |
| 986 | table = hq_env.command(["task", "list", "1", "-v"], as_table=True) |
| 987 | assert table.get_column_value("Error")[0] == "Testing message" |
| 988 | # print(table) |
| 989 | |
| 990 | |
| 991 | def test_long_custom_error_message(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected