Skip to content

Conversation

@arvind4501
Copy link
Contributor

  • Fix AzureRM UI test host deletion assertion

(cherry picked from commit 7532ef3)

Problem Statement

Solution

Related Issues

* Fix AzureRM UI test host deletion assertion

---------

Co-authored-by: Arvind Jangir <[email protected]>
(cherry picked from commit 7532ef3)
@arvind4501 arvind4501 added the No-CherryPick PR doesnt need CherryPick to previous branches label Dec 23, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The wait_for condition session.host_new.search(fqdn)[0].get('Name') == 'No Results' can raise IndexError if the search returns an empty list; consider making the polling condition resilient to both an empty result set and the 'No Results' row (e.g., inspecting the full list safely before indexing).
  • Instead of hardcoding the 'No Results' string in the assertion, consider using a constant or helper method from the page object layer (if available) so the test is less brittle to UI text changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `wait_for` condition `session.host_new.search(fqdn)[0].get('Name') == 'No Results'` can raise `IndexError` if the search returns an empty list; consider making the polling condition resilient to both an empty result set and the 'No Results' row (e.g., inspecting the full list safely before indexing).
- Instead of hardcoding the `'No Results'` string in the assertion, consider using a constant or helper method from the page object layer (if available) so the test is less brittle to UI text changes.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@arvind4501
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_computeresource_azurerm.py -k 'test_positive_end_to_end_azurerm_ft_host_provision'
provisioning: true

@arvind4501 arvind4501 changed the title Fix AzureRM UI test host deletion assertion (#20466) [6.18.z] Fix AzureRM UI test host deletion assertion (#20466) Dec 23, 2025
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13937
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_computeresource_azurerm.py -k test_positive_end_to_end_azurerm_ft_host_provision --external-logging --include-onprem-provisioning
Test Result : ========== 1 failed, 2 deselected, 12 warnings in 2276.09s (0:37:56) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Dec 23, 2025
@arvind4501
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_computeresource_azurerm.py -k 'test_positive_end_to_end_azurerm_ft_host_provision'
provisioning: true

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13938
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_computeresource_azurerm.py -k test_positive_end_to_end_azurerm_ft_host_provision --external-logging --include-onprem-provisioning
Test Result : ========== 1 failed, 2 deselected, 12 warnings in 2333.28s (0:38:53) ===========

@arvind4501
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_computeresource_azurerm.py -k 'test_positive_end_to_end_azurerm_ft_host_provision'
provisioning: true
airgun: 2249

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13939
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_computeresource_azurerm.py -k test_positive_end_to_end_azurerm_ft_host_provision --external-logging --include-onprem-provisioning
Test Result : ========== 1 passed, 2 deselected, 12 warnings in 2537.72s (0:42:17) ===========

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Dec 23, 2025
@Gauravtalreja1 Gauravtalreja1 added Failed_AutoCherryPick Issue for failed/conflicted auto cherry pick of PRs 6.18.z Introduced in or relating directly to Satellite 6.18 labels Dec 23, 2025
@Gauravtalreja1 Gauravtalreja1 merged commit 67f6d85 into SatelliteQE:6.18.z Dec 23, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.18.z Introduced in or relating directly to Satellite 6.18 Failed_AutoCherryPick Issue for failed/conflicted auto cherry pick of PRs 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.

3 participants