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

[CV Eval] Test Coverage for ccv interaction with incremental update #15525

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

sambible
Copy link
Contributor

Problem Statement

Adds coverage for https://bugzilla.redhat.com/show_bug.cgi?id=1974225 / https://issues.redhat.com/browse/SATQE-17141

Related Issues

There is one usage of time.sleep(2) - this is to allow the incremental update to propagate, and trigger the CCV publish, but there's probably a better way for this to be done.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentview.py -k 'test_ccv_inc_update_autopublish'

@sambible sambible added CherryPick PR needs CherryPick to previous branches 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 Jun 26, 2024
@sambible sambible self-assigned this Jun 26, 2024
@sambible sambible requested a review from a team as a code owner June 26, 2024 23:15
@sambible
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentview.py -k 'test_ccv_inc_update_autopublish'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7550
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_contentview.py -k test_ccv_inc_update_autopublish --external-logging
Test Result : ========= 1 passed, 116 deselected, 125 warnings in 748.89s (0:12:28) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 26, 2024
}
)
# Gives time for the incremental update to finish, and propagate a publish of the composive cv
time.sleep(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see "Publish CV" task being spawned after incremental update. Should we wait for them to finish instead of the sleep?

Suggested change
time.sleep(2)
module_target_sat.wait_for_tasks(
search_query=(
f'Actions::Katello::ContentView::Publish and organization_id = {module_org.id}'
),
max_tries=5,
poll_rate=10,
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is definitely a more deterministic way to do this. I'll give it a try. Should be consistent.

@sambible sambible requested a review from a team June 27, 2024 16:46
@sambible
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentview.py -k 'test_ccv_inc_update_autopublish'

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

PRT Result

Build Number: 7565
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_contentview.py -k test_ccv_inc_update_autopublish --external-logging
Test Result : ========= 1 passed, 116 deselected, 125 warnings in 884.22s (0:14:44) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 27, 2024
@vsedmik vsedmik added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Jun 28, 2024
@vsedmik vsedmik merged commit c4b433f into SatelliteQE:master Jun 28, 2024
12 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 28, 2024
…15525)

* CV Eval BZ coverage for ccv inc update

* Remove sleep, and instead wait on cv publish task

(cherry picked from commit c4b433f)
github-actions bot pushed a commit that referenced this pull request Jun 28, 2024
…15525)

* CV Eval BZ coverage for ccv inc update

* Remove sleep, and instead wait on cv publish task

(cherry picked from commit c4b433f)
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
…atelliteQE#15525)

* CV Eval BZ coverage for ccv inc update

* Remove sleep, and instead wait on cv publish task
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants