Skip to content

Commit

Permalink
fix tests - handle cwltool logs sometimes adding a suffix idx to dist…
Browse files Browse the repository at this point in the history
…inguish between similarly named jobs
  • Loading branch information
fmigneault committed Dec 19, 2024
1 parent b91cfc6 commit 83169b5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/processes/test_wps_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,22 @@ def test_stdout_stderr_logging_for_commandline_tool_success(caplog):
r".*",
log_data,
re.MULTILINE | re.DOTALL
)
), f"Captured Log Information expected in:\n{log_data}"
# cwltool call with reference to the command and stdout/stderr redirects
assert re.match(
r".*"
rf"cwltool:job.* \[job {process.id}\].*echo \\\n"
rf"cwltool:job.* \[job {process.id}(_[0-9]+)?\].*echo \\\n"
r"\s+'Dummy message' \> [\w\-/\.]+/stdout\.log 2\> [\w\-/\.]+/stderr\.log\n"
r".*",
log_data,
re.MULTILINE | re.DOTALL
), f"Information expected in:\n{log_data}"
assert f"[cwltool] [job {process.id}] completed success" in log_data
), f"Command Information with Log redirects expected in:\n{log_data}"
assert re.match(
r".*"
rf"\[cwltool\] \[job {process.id}(_[0-9]+)?\] completed success",
log_data,
re.MULTILINE | re.DOTALL
), f"Information about successful job expected in:\n{log_data}"


def test_stdout_stderr_logging_for_commandline_tool_failure(caplog):
Expand Down

0 comments on commit 83169b5

Please sign in to comment.