Skip to content

Commit

Permalink
Test: Add stderr to log when test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
elkoniu committed Jan 8, 2024
1 parent 197b77f commit 8762e7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/integration/test_koji.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ def check_res(self, res: subprocess.CompletedProcess):
if res.returncode != 0:
msg = ("\nkoji FAILED:" +
"\n args: [" + " ".join(res.args) + "]" +
"\n error: " + res.stdout)
"\n error: " + res.stdout +
"\n stderr: " + res.stderr)
self.fail(msg)

def check_fail(self, res: subprocess.CompletedProcess):
if res.returncode == 0:
msg = ("\nkoji unexpectedly succeed:" +
"\n args: [" + " ".join(res.args) + "]" +
"\n error: " + res.stdout)
"\n error: " + res.stdout +
"\n stderr: " + res.stderr)
self.fail(msg)

def task_id_from_res(self, res: subprocess.CompletedProcess) -> str:
Expand Down

0 comments on commit 8762e7e

Please sign in to comment.