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.16.z] Several ContentView test fixes #16496

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #16486

Problem Statement

Several CV tests are failing for various reasons:

  1. Ostree cases used to be skipped since hooked on a CLOSED_WONT_FIX BZ. The skip_if_open has been removed here
  2. Repo removal test cases are failing for a long time with key error since the file-repositories nor yum-repositories are returned by hammer if there are no repos to be listed.
  3. sat.cli.version_incremental_update(output_format='csv') does not return anything when CSV format is requested since there is nothing to be listed in that format.
  4. CV versions listing changed. There was an old sorting issue which was fixed but affected test cases were not.

Solution

  1. I had to choose if to stub or remove the Ostree cases. Decided to stub them since there still is some support for them in upstream.
  2. Just assert the fields are not listed after repo removal.
  3. Decided to default to the base output format since that returns at least the CV version. The assertion in test_positive_inc_update_no_lce was done above an empty list, that's why it passed anyway.
  4. Use sorted to get the latest CV version.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentview.py -k 'rh_content_removed or file_repo_removal or e_inc_update'
trigger: test-robottelo
pytest: tests/foreman/cli/test_docker.py -k name_change_after_promotion

* Stub ostree test classes

Ostree is unsupported since 6.10 and these classes were marked to
skip_if_open("BZ:2122780"), which was removed by #16347.
So we can either stub them or remove completely.

* Fix repo_removal test cases

* Default to 'base' for CVV incremental_update

Since there is no CSV returned by the incremental_update anyway.

* Fix out of order promotion of a CV version

By promotion of the latest version.

(cherry picked from commit 88e5aa0)
@Satellite-QE Satellite-QE requested review from a team as code owners September 25, 2024 12:53
@Satellite-QE Satellite-QE added 6.16.z Introduced in or relating directly to Satellite 6.16 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Sep 25, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_docker.py -k name_change_after_promotion

@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Sep 25, 2024
@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 8800
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_docker.py -k name_change_after_promotion --external-logging
Test Result : ========== 2 passed, 48 deselected, 76 warnings in 747.06s (0:12:27) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Sep 25, 2024
@Satellite-QE Satellite-QE merged commit c0c46c4 into 6.16.z Sep 25, 2024
17 of 18 checks passed
@Satellite-QE Satellite-QE deleted the cherry-pick-6.16.z-88e5aa0400d0264fef820bbe09a04cb68173a649 branch September 25, 2024 13:14
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 Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 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.

2 participants