refactor(issue-17): item 4 - the delegate-job wrapper's decisions move to Python #51

Merged
Godopu merged 9 commits from refactor/issue-17-item4 into main 2026-10-07 16:37:53 +00:00
Showing only changes of commit 6bf9f92462 - Show all commits
+1 -1
View File
@@ -389,7 +389,7 @@ def test_wrapper_exit_code_mapping_literals_are_frozen(mam_sandbox):
# wrapper reaches it only through `_decide`.
for literal in ('_decide sub-status "$sub_rc"', '_decide exit-code "$job_status"', "--sub-rc \"$sub_rc\""):
assert literal in text, literal
decide = _import_delegation(mam_sandbox, "wrapper")
from lib_py.delegation import wrapper as decide # no scripts/ shim: the wrapper calls it with -m
assert decide.EXIT_CODES == {"completed": 0, "error": 1, "timeout": 2, "broker_unavailable": 3, "cancelled": 5}
assert [decide.sub_status(rc, str(mam_sandbox), "none") for rc in range(6)] == [
"completed", "error", "timeout", "broker_unavailable", "timeout", "timeout"]