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

[Customer Case] Applied Errata report with invalid errata #15378

Merged

Conversation

ColeHiggins2
Copy link
Member

Customer case automation for generating an applied errata report after applying an invalid errata.

All we need to test here is to make sure the report is generated without failure. However, because we never actually apply any errata, the report is an empty list. We can just assume it generated if there are no failures, but if anyone has any ideas on a potential assert that can be made im open to suggestions.

@ColeHiggins2 ColeHiggins2 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jun 7, 2024
@ColeHiggins2 ColeHiggins2 self-assigned this Jun 7, 2024
@ColeHiggins2 ColeHiggins2 requested a review from a team as a code owner June 7, 2024 14:31
Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

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

:shipit:

:CaseImportance: High

:BZ: 2176368
"""
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
"""
:customerscenario: true
"""

Copy link
Contributor

@vijaysawant vijaysawant left a comment

Choose a reason for hiding this comment

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

May be we can assert these errors in output

undefined method `[]' for nil:NilClass"
undefined method `last' for nil:NilClass"

},
}
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think any other assertion can be implementated after generating errata report?

Copy link
Member Author

Choose a reason for hiding this comment

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

We talked about this in chat, There are not any good ways to make an assertion here. All we need to test is that this report is generated. A failing tests is a good enough indicator here

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.

Just two small proposals, otherwise looks good.

Comment on lines 477 to 479
:CaseImportance: High

:BZ: 2176368
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
:CaseImportance: High
:BZ: 2176368
:BZ: 2176368
:customerscenario: true

No need to declare the CaseImportance again (same level as module-wide), but we should provide customerscenario for customer cases.

Comment on lines +481 to +484
activation_key = target_sat.api.ActivationKey(
environment=function_lce, organization=function_org
).create()
cv = target_sat.api.ContentView(organization=function_org).create()
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
activation_key = target_sat.api.ActivationKey(
environment=function_lce, organization=function_org
).create()
cv = target_sat.api.ContentView(organization=function_org).create()

We could probably use function_ak_with_cv fixture instead (and function_promoted_cv it uses inside).

Copy link
Member Author

Choose a reason for hiding this comment

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

Had some issues with lce using that fixture, Test was failing, Lets just keep it how it is

Copy link
Contributor

Choose a reason for hiding this comment

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

I have also found that fixture fails to setup as expected

@ColeHiggins2
Copy link
Member Author

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7460
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_reporttemplates.py -k test_positive_applied_errata_report_with_invalid_errata --external-logging
Test Result : ========= 3 passed, 38 deselected, 286 warnings in 2164.84s (0:36:04) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 20, 2024
@ColeHiggins2 ColeHiggins2 added AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jun 24, 2024
@vsedmik vsedmik merged commit 7fa1c33 into SatelliteQE:master Jun 24, 2024
11 checks passed
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
…E#15378)

* adding tests for invalid errata

* addressing comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants