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.14.z] Eval CapsuleContent::API Assertion Errors, time delta/format in 'wait_for_sync()' #14413

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Mar 14, 2024

Parent pull request: #14066
Fixes to capsule_mixins method wait_for_sync, adjust conditionals and assertions to
verify any recently invoked sync task(s). Record and pass a start timestamp in the tests calling this method.

Specific modifications for 6.14.z-

  • capsule_mixins.py::118-124 (link):
    After polling, when checking that the final active sync task's end_time is the same as capsule's last_sync_time,
    in 6.14.z, capsule.content_get_sync() does not return ['last_sync_task'] info, yields keyError.
    I instead now save the ended_at time from reading the final active task by :id. Then assert the times match.

PRT Case:

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

Demonstration (local):

(venvrobottelo) rh-ee-damoore-mac:robottelo damoore$ pytest tests/foreman/api/test_capsulecontent.py::TestCapsuleContentManagement
============================================================ test session starts ============================================================
platform darwin -- Python 3.11.5, pytest-7.4.4, pluggy-1.3.0
Mandatory Requirements Mismatch: pytest==8.0.2 betelgeuse==1.11.0 pytest-mock==3.12.0 jinja2==3.1.3 deepdiff==6.7.1 tenacity==8.2.3 manifester==0.0.14 pytest-xdist==3.5.0 dynaconf[vault]==3.2.4 pytest-fixturecollection==0.1.2 python-box==7.1.1 wrapanapi==3.6.0 cryptography==42.0.5 pytest-reportportal==5.4.0 docker==7.0.0  # Temporary until Broker is back on PyPi productmd==1.38 paramiko==3.4.0  # Temporary until Broker is back on PyPi navmazing==1.2.2
Optional Requirements Mismatch: flake8==7.0.0 redis==5.0.3 sphinx==7.2.6 manage==0.1.15 sphinx-autoapi==3.0.0 pytest-cov==4.1.0
To update mismatched requirements, run the pytest command with '--update-required-reqs' OR '--update-all-reqs' option.
shared_function enabled - OFF - scope:  - storage: file
rootdir: /Users/damoore/projects/robottelo
configfile: pyproject.toml
plugins: ibutsu-2.2.4, order-1.2.0, cov-4.1.0, cases-3.8.1, services-2.2.1, reportportal-5.3.1, mock-3.12.0, fixturecollection-0.1.1, xdist-3.5.0
collected 18 items   

tests/foreman/api/test_capsulecontent.py ..................          [100%]
============================================== 18 passed, 1139 warnings in 5439.30s (1:30:39) ===============================================
(venvrobottelo) rh-ee-damoore-mac:robottelo damoore$ 

@damoore044 damoore044 added No-CherryPick PR doesnt need CherryPick to previous branches 6.14.z Introduced in or relating directly to Satellite 6.14 labels Mar 14, 2024
@damoore044 damoore044 self-assigned this Mar 14, 2024
@damoore044
Copy link
Contributor Author

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

@damoore044 damoore044 requested review from a team March 15, 2024 14:48
@Satellite-QE
Copy link
Collaborator

Satellite-QE commented Mar 15, 2024

PRT Result

Build Number: 6085
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_capsulecontent.py::TestCapsuleContentManagement --external-logging
Test Result : =========== 16 failed, 2 passed, 1087 warnings in 5735.23s (1:35:35) ===========

David- There is version specific (6.14.z only) keyError for all cases calling wait_for_sync, when trying to access last_sync_task from capsule.content_get_sync(). Investigating a specific fix for 6.14. Fix identified, explained above.

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

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6091
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_capsulecontent.py::TestCapsuleContentManagement --external-logging
Test Result : ======= 7 failed, 10 passed, 979 warnings, 1 error in 5235.53s (1:27:15) =======

change to sca-only orgs, entitlement orgs are failing

assert capsule sync task(s) when invoked, and sync status

pre-commit fix, refactor wait_for_sync() into concise steps
@damoore044
Copy link
Contributor Author

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6112
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_capsulecontent.py::TestCapsuleContentManagement --external-logging
Test Result : ================ 18 passed, 1389 warnings in 6324.62s (1:45:24) ================

@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 Mar 18, 2024
@sambible sambible merged commit 9c253bf into SatelliteQE:6.14.z Mar 18, 2024
12 of 13 checks passed
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 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