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

[Reporting] Updating reporting tests to be sca compliant #15166

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

ColeHiggins2
Copy link
Member

SCA is now the default in 6.16. This PR is for updating all tests under the Reporting Component
SAT-24355

@ColeHiggins2 ColeHiggins2 added RFE Issues that are requesting an enhancement to robottelo No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels May 23, 2024
@ColeHiggins2 ColeHiggins2 self-assigned this May 23, 2024
@ColeHiggins2 ColeHiggins2 requested a review from a team as a code owner May 23, 2024 21:12
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.

Looks good, just one suggestion for improvement.
Could you run PRT for some test using the setup_content fixture? The test_positive_generate_job_report could be a good candidate.

Comment on lines 718 to 722
assert (
res[0]['Host'] == content_hosts[0].hostname and res[1]['Host'] == content_hosts[1].hostname
) or (
res[0]['Host'] == content_hosts[1].hostname and res[1]['Host'] == content_hosts[0].hostname
)
Copy link
Contributor

@vsedmik vsedmik May 28, 2024

Choose a reason for hiding this comment

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

Let's use sets to check if all hosts were reported.

Suggested change
assert (
res[0]['Host'] == content_hosts[0].hostname and res[1]['Host'] == content_hosts[1].hostname
) or (
res[0]['Host'] == content_hosts[1].hostname and res[1]['Host'] == content_hosts[0].hostname
)
assert {i['Host'] for i in res} == {i.hostname for i in content_hosts}

@ColeHiggins2
Copy link
Member Author

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7278
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_reporttemplates.py::test_positive_generate_job_report --external-logging
Test Result : ================ 6 passed, 1060 warnings in 3358.02s (0:55:58) =================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 4, 2024
@vsedmik vsedmik merged commit 17aafe4 into SatelliteQE:master Jun 5, 2024
10 checks passed
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
…#15166)

* Updating reporting component to sca only

* addressing comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR RFE Issues that are requesting an enhancement to robottelo Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants