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

Fix long failing reporting API tests #17189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LadislavVasina1
Copy link
Contributor

@LadislavVasina1 LadislavVasina1 commented Dec 17, 2024

Problem Statement

Some API reporting tests did not work in the stream due to multi-CV changes.
The main goal is to get rid of Environment ID and content view ID must be provided together errors which appear due to outdated test composition.

Solution

This PR fixes these issues by creating a fixture that promotes CV that is used with LCE which is needed now.

Related Issues

It is expected for the PRT to fail with an error related to the usage of --force option.
see: (SAT-30043)

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/api/test_reporttemplates.py -k "test_positive_applied_errata or test_positive_applied_errata_report_with_invalid_errata or test_positive_applied_errata_by_search"

@LadislavVasina1 LadislavVasina1 added API Issues and PRs involving the API No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Dec 17, 2024
@LadislavVasina1 LadislavVasina1 self-assigned this Dec 17, 2024
@LadislavVasina1 LadislavVasina1 requested a review from a team as a code owner December 17, 2024 11:37
@LadislavVasina1
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_reporttemplates.py -k "test_positive_applied_errata or test_positive_applied_errata_report_with_invalid_errata or test_positive_applied_errata_by_search"

@LadislavVasina1
Copy link
Contributor Author

All tests failed with You must use --force to set a value other than 'enabled' as expected

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.

Codewisely looks good to me.
We may need to wait until a fix PR for the --force issue is up and kill two flies with one stone (merge two PRs with one PRT).

@jeremylenz
Copy link
Contributor

a fix PR for the --force issue is up

Katello/hammer-cli-katello#979

sorry about that ;)

@vsedmik
Copy link
Contributor

vsedmik commented Dec 17, 2024

trigger: test-robottelo
pytest: tests/foreman/api/test_reporttemplates.py -k "test_positive_applied_errata or test_positive_applied_errata_report_with_invalid_errata or test_positive_applied_errata_by_search"
Katello:
  hammer-cli-katello: 979

Comment on lines +88 to +90
This fixture sets up an activation key with LCE that has CV promoted to it.

:return: activation_key, cv, function_lce, function_org
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This fixture sets up an activation key with LCE that has CV promoted to it.
:return: activation_key, cv, function_lce, function_org
This function scope fixture creates CV and publish / promote it to LCE. It aslo creates AK which is associate with LCE & CV.
:return: AK, CV, LCE and Org

Copy link
Contributor

Choose a reason for hiding this comment

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

I am suggesting some non blocking changes related to doc string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues and PRs involving the API No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants