SatelliteQE / robottelo

Robottelo is a test suite that exercises The Foreman.
GNU General Public License v3.0
61 stars 114 forks source link

[6.13.z] Fix Discovery Tests #16906

Closed Satellite-QE closed 2 weeks ago

Satellite-QE commented 2 weeks ago

Cherrypick of PR: https://github.com/SatelliteQE/robottelo/pull/16605

Problem Statement

Discovery tests were failing with hussh backend as the shell didn't have stdout attribute and also because of a bug in hussh: https://github.com/JacobCallahan/Hussh/issues/26

Solution

Updated the tests to exit the shell contextmanager and read shell.result.stdout. Also, because of the bug, we need to explicitly close the shell before exiting contextmanager.

Related Issues

Satellite-QE commented 2 weeks ago
trigger: test-robottelo
pytest: tests/foreman/api/test_discoveredhost.py --external-logging --include-onprem-provisioning -m on_premises_provisioning
provisioning: true
env:
    ROBOTTELO_server__deploy_arguments__deploy_rhel_version: '9'
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.16'
    ROBOTTELO_server__deploy_arguments__deploy_snap_version: '9.0'
    BROKER_SSH_BACKEND: hussh
Satellite-QE commented 2 weeks ago

PRT Result

Build Number: 9350
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_discoveredhost.py --external-logging --include-onprem-provisioning -m on_premises_provisioning --external-logging --include-onprem-provisioning
Test Result : ==== 2 failed, 8 passed, 5 deselected, 1433 warnings in 6893.38s (1:54:53) =====