Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print out stdout and stderr from checkmetadata result #306

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions testlib/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _check_encryption_information_consistency(self, pool_object_path, metadata):
elif features is not None:
self.assertNotIn("Encryption", metadata["features"])

def run_check(self, stop_time):
def run_check(self, stop_time): # pylint: disable=too-many-locals
"""
Run the check.

Expand Down Expand Up @@ -297,8 +297,16 @@ def run_check(self, stop_time):
],
stdout=subprocess.PIPE,
) as proc:
(stdoutdata, _) = proc.communicate()
self.assertEqual(proc.returncode, 0, stdoutdata)
(stdoutdata, stderrdata) = proc.communicate()
self.assertEqual(
proc.returncode,
0,
(
f'stdout: {stdoutdata.decode("utf-8")}'
"; "
f'stderr: {stderrdata.decode("utf-8")}'
),
)
except FileNotFoundError as err:
raise RuntimeError(f"{stratisd_tools} not found") from err

Expand Down
Loading