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.15.z] Fix parametrization in test_positive_reboot_all_pxe_hosts #14083

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #13949

Problem Statement

Missing indirect=True in parametrization for provision_multiple_hosts fixture which causes,

tests/foreman/api/test_discoveredhost.py:427: in test_positive_reboot_all_pxe_hosts
    for host in provision_multiple_hosts:
E   TypeError: 'int' object is not iterable

Solution

using getattr to set count as default for this fixture, and removing @pytest.mark.parametrize for this fixture, along with mark for pxe_loader fixture which also has bios set as default.

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)
@Satellite-QE Satellite-QE added the 6.15.z Introduced in or relating directly to Satellite 6.15 label Feb 15, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner February 15, 2024 06:52
@Satellite-QE Satellite-QE added Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Feb 15, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner February 15, 2024 06:52
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/api/test_discoveredhost.py -k test_positive_reboot_all_pxe_hosts
provisioning: true

@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Feb 15, 2024
@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 5730
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_discoveredhost.py -k test_positive_reboot_all_pxe_hosts
Test Result : ========== 14 deselected, 10 warnings, 1 error in 1422.19s (0:23:42) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Feb 15, 2024
@shweta83
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/api/test_discoveredhost.py -k test_positive_reboot_all_pxe_hosts
provisioning: true

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 5736
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_discoveredhost.py -k test_positive_reboot_all_pxe_hosts
Test Result : ===== 1 failed, 14 deselected, 11 warnings, 1 error in 2191.89s (0:36:31) ======

@Gauravtalreja1
Copy link
Collaborator

As I mentioned on original PR, PRT failure isn't related to the changes of this PR, but it is related to a BZ 2264195, I've opened a quick fix theforeman/foreman_discovery#623 in upstream already and handled the changes here.
And, now this PR is ready for review

@omkarkhatavkar omkarkhatavkar merged commit c3d14e4 into 6.15.z Feb 15, 2024
13 of 16 checks passed
@omkarkhatavkar omkarkhatavkar deleted the cherry-pick-6.15.z-55109fbe66d6adbef55b5716584f9a5c22e80b85 branch February 15, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants