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

Fix parametrization in test_positive_reboot_all_pxe_hosts #13949

Merged

Conversation

Gauravtalreja1
Copy link
Collaborator

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.

@Gauravtalreja1 Gauravtalreja1 added TestFailure Issues and PRs related to a test failing in automation CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jan 31, 2024
@Gauravtalreja1 Gauravtalreja1 self-assigned this Jan 31, 2024
@Gauravtalreja1 Gauravtalreja1 requested review from a team as code owners January 31, 2024 09:55
@Gauravtalreja1
Copy link
Collaborator Author

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

@Gauravtalreja1
Copy link
Collaborator Author

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

@JacobCallahan
Copy link
Member

ACK on the intent of the changes, but can you determine why the test is failing in PRT? If unrelated to your change, then the failure isn't a blocker.

@Gauravtalreja1
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
Copy link
Collaborator

PRT Result

Build Number: 5698
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 863.88s (0:14:23) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Feb 13, 2024
@Gauravtalreja1
Copy link
Collaborator Author

Yes, the 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 55109fb into SatelliteQE:master Feb 15, 2024
6 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 15, 2024
Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)
github-actions bot pushed a commit that referenced this pull request Feb 15, 2024
Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)
github-actions bot pushed a commit that referenced this pull request Feb 15, 2024
Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)
@Gauravtalreja1 Gauravtalreja1 deleted the fix-discovery-reboot branch February 15, 2024 10:35
omkarkhatavkar pushed a commit that referenced this pull request Feb 15, 2024
…14083)

Fix parametrization in test_positive_reboot_all_pxe_hosts (#13949)

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)

Co-authored-by: Gaurav Talreja <[email protected]>
omkarkhatavkar pushed a commit that referenced this pull request Feb 15, 2024
…14084)

Fix parametrization in test_positive_reboot_all_pxe_hosts (#13949)

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)

Co-authored-by: Gaurav Talreja <[email protected]>
omkarkhatavkar pushed a commit that referenced this pull request Feb 15, 2024
…14085)

Fix parametrization in test_positive_reboot_all_pxe_hosts (#13949)

Signed-off-by: Gaurav Talreja <[email protected]>
(cherry picked from commit 55109fb)

Co-authored-by: Gaurav Talreja <[email protected]>
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR TestFailure Issues and PRs related to a test failing in automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants