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

[6.16.z] better logging of fam failures #17001

Open
wants to merge 1 commit into
base: 6.16.z
Choose a base branch
from

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #16967

Problem Statement

The output of FAM tests is mangled due to how pytest tries to print the big result object.
There are no linebreaks and it's super hard to find the failure.

Additionally the double assert is pointless, as it asserts twice the same thing: the result is successful.

Solution

Stop asserting PASSED in stdout (additionally saves the case where there is the string PASSED in the output for some reason, but the test actually failed).
Pass a custom error output to the status == 0 assertion, including stdout, stderr and the status code.

Related Issues

@Satellite-QE Satellite-QE requested a review from a team as a code owner November 26, 2024 12:44
@Satellite-QE Satellite-QE added 6.16.z Introduced in or relating directly to Satellite 6.16 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Nov 26, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/sys/test_fam.py::test_positive_import_run_roles

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 9463
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/sys/test_fam.py::test_positive_import_run_roles --external-logging
Test Result : ================== 1 passed, 9 warnings in 560.04s (0:09:20) ===================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z Introduced in or relating directly to Satellite 6.16 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants