Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
Yngve S. Kristiansen committed Sep 19, 2023
1 parent 9c49c2d commit e3226ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/unit_tests/cli/test_integration_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,20 +905,20 @@ def test_that_stop_on_fail_workflow_jobs_stop_ert():
"""
STOP_ON_FAIL True
INTERNAL False
EXECUTABLE shitty_script.sh
EXECUTABLE failing_script.sh
"""
)
)

with open("shitty_script.sh", "w", encoding="utf-8") as s:
with open("failing_script.sh", "w", encoding="utf-8") as s:
s.write(
"""
#!/bin/bash
ekho helo wordl
"""
)

os.chmod("shitty_script.sh", os.stat("shitty_script.sh").st_mode | 0o111)
os.chmod("failing_script.sh", os.stat("failing_script.sh").st_mode | 0o111)

with open("dump_failing_workflow", "w", encoding="utf-8") as f:
f.write("failjob")
Expand All @@ -934,6 +934,6 @@ def test_that_stop_on_fail_workflow_jobs_stop_ert():
)
)

parsed = ert_parser(None, args=[ENSEMBLE_EXPERIMENT_MODE, "poly.ert"])
parsed = ert_parser(None, args=[TEST_RUN_MODE, "poly.ert"])
with pytest.raises(ErtCliError, match="Workflow job failjob failed with error"):
run_cli(parsed)
4 changes: 3 additions & 1 deletion tests/unit_tests/job_queue/test_workflow_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ def test_stop_on_fail_is_parsed_internal():
class SevereErtFailureScript(ErtScript):
def __init__(self, ert, storage, ensemble=None):
super().__init__(ert, storage, ensemble=ensemble)
assert False, "Severe ert failure"
def run(self, *args):
pass
"""
)

Expand Down

0 comments on commit e3226ed

Please sign in to comment.