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-alernative solution for default subscription search option #15237

Conversation

vijaysawant
Copy link
Contributor

Problem Statement

  • Test case test_positive_access_with_non_admin_user_with_manifest from UI > test_subscription.py was failing due to wrong (empty search) result, search box xpath was incorrect and gave below error.
  • Airgun PR [Link] will fix xpath

Error:
E TypeError: 'NoneType' object is not subscriptable

Solution

  • This alernate solution will search for all subscriptions and iterate over it, break the for loop once it matches with DEFAULT_SUBSCRIPTION_NAME
  • session.subscription.search(f'name = "{DEFAULT_SUBSCRIPTION_NAME}"')[0]['Name'] this part searches correctly but returns all present subsriptions from Subscription page instead of Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes), also returns Red Hat Beta Access as 0th entry

Related Issues

SatelliteQE/airgun#1405

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@vijaysawant vijaysawant added TestFailure Issues and PRs related to a test failing in automation No-CherryPick PR doesnt need CherryPick to previous branches 6.15.z Introduced in or relating directly to Satellite 6.15 labels May 30, 2024
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@vijaysawant vijaysawant changed the title alernative solution for default subscription search option 6.15.z-alernative solution for default subscription search option May 30, 2024
@vijaysawant vijaysawant force-pushed the 6.15.z-subscription-search-box-fix branch from 8552edc to 483590c Compare May 30, 2024 14:22
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7214
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 9 deselected, 18 warnings in 809.86s (0:13:29) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label May 30, 2024
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7215
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 9 deselected, 18 warnings in 784.18s (0:13:04) ===========

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7226
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 9 deselected, 18 warnings in 702.49s (0:11:42) ===========

@vijaysawant
Copy link
Contributor Author

Test passed locally several time, it is failing in CI while reading subscription table.

collected 10 items / 9 deselected / 1 selected

tests/foreman/ui/test_subscription.py::test_positive_access_with_non_admin_user_with_manifest 

=========== 1 passed, 9 deselected, 10 warnings in 84.70s (0:01:24) ============
PASSED

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15.1'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7227
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 9 deselected, 18 warnings in 763.56s (0:12:43) ===========

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
airgun: 1405
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15.1'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7231
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : ========== 1 failed, 9 deselected, 18 warnings in 1660.91s (0:27:40) ===========

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
airgun: 1405
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15.1'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7233
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 passed, 9 deselected, 18 warnings in 706.01s (0:11:46) ===========

@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 May 31, 2024
@vijaysawant vijaysawant marked this pull request as ready for review May 31, 2024 14:36
@vijaysawant vijaysawant requested a review from a team as a code owner May 31, 2024 14:36
@vijaysawant vijaysawant requested a review from vsedmik May 31, 2024 14:38
Copy link
Contributor

@sambible sambible left a comment

Choose a reason for hiding this comment

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

:shipit: pending Airgun merge

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
airgun: 1405
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15.1'

@vijaysawant vijaysawant added 6.14.z Introduced in or relating directly to Satellite 6.14 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing and removed No-CherryPick PR doesnt need CherryPick to previous branches labels Jun 3, 2024
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7249
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 failed, 9 deselected, 18 warnings in 712.54s (0:11:52) ===========

@Satellite-QE Satellite-QE added PRT-Failed Indicates that latest PRT run is failed for the PR and removed PRT-Passed Indicates that latest PRT run is passed for the PR labels Jun 3, 2024
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_access_with_non_admin_user_with_manifest'
airgun: 1405
env:
    ROBOTTELO_server__deploy_arguments__deploy_sat_version: '6.15.1'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7250
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_subscription.py -k test_positive_access_with_non_admin_user_with_manifest --external-logging
Test Result : =========== 1 passed, 9 deselected, 18 warnings in 738.50s (0:12:18) ===========

@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 Jun 3, 2024
@vijaysawant vijaysawant added the CherryPick PR needs CherryPick to previous branches label Jun 3, 2024
@vijaysawant vijaysawant requested a review from sambible June 3, 2024 10:41
@omkarkhatavkar omkarkhatavkar merged commit eba5320 into SatelliteQE:6.15.z Jun 3, 2024
24 of 31 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 3, 2024
…5237)

* alernative solution for default subscription search option

* addressed review comments, shorten the for loop

(cherry picked from commit eba5320)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-Passed Indicates that latest PRT run is passed 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.

5 participants