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

delete subscription manifest so it can re imported again #17142

Merged

Conversation

vijaysawant
Copy link
Contributor

@vijaysawant vijaysawant commented Dec 10, 2024

Problem Statement

  • test_sca_end_to_end and test_positive_expired_SCA_cert_handling tests are failing imported manifest issue.
  • Error: This subscription management application has already been imported by another owner
  • I guess test_positive_create test uses mdoule_manifest_org fixture and it is creating issue while importing manifest

Solution

Delete test_positive_create test, as it uses module_sca_manifest fixture and which is used inside any *_sca_manifest_org fixture that executed on so many places.

Local test execution

============================= test session starts ==============================
collecting ... 2024-12-10 22:29:23 - robottelo.collection - INFO - Processing test items to add testimony token markers
collected 11 items / 8 deselected / 3 selected

tests/foreman/api/test_subscription.py::test_positive_create 
tests/foreman/api/test_subscription.py::test_sca_end_to_end[rhel7-ipv4] 
tests/foreman/api/test_subscription.py::test_positive_expired_SCA_cert_handling[rhel7-ipv4] 

=========== 3 passed, 8 deselected, 58 warnings in 697.74s (0:11:37) ===========

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/api/test_subscription.py

@vijaysawant vijaysawant added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing Stream Introduced in or relating directly to Satellite Stream/Master 6.16.z Introduced in or relating directly to Satellite 6.16 labels Dec 10, 2024
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_subscription.py

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9580
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_subscription.py --external-logging
Test Result : ===== 1 failed, 9 passed, 1 deselected, 182 warnings in 1293.27s (0:21:33) =====

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Dec 10, 2024
@vijaysawant
Copy link
Contributor Author

I could see one test failed test_positive_async_endpoint_for_manifest_refresh, There is no relation with the changes made in this PR, assertion error tells that after manifest refresh expected message did not present in the production log, and hence this test failed.
Error:

AssertionError: assert 'Sending GET request to upstream Candlepin' in 'stdout:\n\nstderr:\n\nstatus: 1'
 +  where 'stdout:\n\nstderr:\n\nstatus: 1' = str(stdout:\n\nstderr:\n\nstatus: 1)

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9584
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_subscription.py --external-logging
Test Result : ===== 1 failed, 9 passed, 1 deselected, 191 warnings in 1393.59s (0:23:13) =====

@vijaysawant vijaysawant marked this pull request as ready for review December 11, 2024 09:17
@vijaysawant vijaysawant requested a review from a team as a code owner December 11, 2024 09:17
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_subscription.py -k 'test_sca_end_to_end or test_positive_expired_SCA_cert_handling or test_positive_create'

@vijaysawant
Copy link
Contributor Author

Local test execution result:

(uv-venv-master) visawant@fedora:~/Desktop/workspace/robottelo$ pytest tests/foreman/api/test_subscription.py -k 'test_sca_end_to_end or test_positive_expired_SCA_cert_handling or test_positive_create'
============================================================================ test session starts ============================================================================
platform linux -- Python 3.11.1, pytest-8.3.4, pluggy-1.5.0
Mandatory Requirements Mismatch: productmd==1.43 apypie==0.5.0 pytest-reportportal==5.4.7 wrapanapi python-box==7.3.0
Optional Requirements Mismatch: ruff==0.8.2 sphinx-autoapi==3.4.0 pre-commit==4.0.1 redis==5.2.1
To update requirements, run the pytest with '--update-required-reqs' OR '--update-all-reqs' option.
shared_function enabled - OFF - scope:  - storage: file
rootdir: /home/visawant/Desktop/workspace/robottelo
configfile: pyproject.toml
plugins: ibutsu-2.2.4, mock-3.14.0, services-2.2.1, cov-6.0.0, reportportal-5.4.5, fixturecollection-0.1.2, xdist-3.6.1, order-1.3.0
collected 11 items / 7 deselected / 4 selected                                                                                                                              

tests/foreman/api/test_subscription.py ....                                                                                                                           [100%]

========================================================= 4 passed, 7 deselected, 78 warnings in 611.74s (0:10:11) ==========================================================


@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9586
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_subscription.py -k test_sca_end_to_end or test_positive_expired_SCA_cert_handling or test_positive_create --external-logging
Test Result : ========== 4 passed, 7 deselected, 117 warnings in 943.12s (0:15:43) ===========

@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 11, 2024
Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

I tend to remove the test_positive_create completely.

In only runs sat.upload_manifest(org.id, module_sca_manifest.content) which is done in any *_sca_manifest_org fixture and executed on so many places. Half of the test suite would fail if this was broken.

@vijaysawant
Copy link
Contributor Author

I tend to remove the test_positive_create completely.

In only runs sat.upload_manifest(org.id, module_sca_manifest.content) which is done in any *_sca_manifest_org fixture and executed on so many places. Half of the test suite would fail if this was broken.

Agree, same functionality has tested in fixture *_sca_manifest_org
Let me remove this test then.

@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_subscription.py -k 'test_sca_end_to_end or test_positive_expired_SCA_cert_handling'

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Dec 11, 2024
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9587
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_subscription.py -k test_sca_end_to_end or test_positive_expired_SCA_cert_handling --external-logging
Test Result : =========== 2 passed, 8 deselected, 54 warnings in 821.51s (0:13:41) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Dec 11, 2024
@ColeHiggins2 ColeHiggins2 merged commit f1ca32b into SatelliteQE:master Dec 11, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 11, 2024
* delete subscription manifest so it can re imported again

* removing test case as discussed in review

(cherry picked from commit f1ca32b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z Introduced in or relating directly to Satellite 6.16 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 Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants