Skip to content

Conversation

@vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Nov 6, 2025

Problem Statement

SAT-30754 needs coverage to test bulk errata applicable and installable endpoints.

Solution

This PR proposes one.

Related Issues

https://issues.redhat.com/browse/SAT-30754
requires: SatelliteQE/nailgun#1375

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py -k test_positive_bulk_erratum_applicable_vs_installable
nailgun: 1375

@vsedmik vsedmik self-assigned this Nov 6, 2025
@vsedmik vsedmik added CherryPick PR needs CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master 6.18.z Introduced in or relating directly to Satellite 6.18 labels Nov 6, 2025
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 6, 2025

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py -k test_positive_erratum_applicable_vs_installable
nailgun: 1375

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider extracting the repeated bulk_applicable_errata and bulk_installable_errata calls into a small helper to reduce duplication and improve test readability.
  • Add a polling or wait step after publishing and promoting the content view to ensure the new version is available before refreshing the host and asserting installability, to avoid flakiness.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider extracting the repeated bulk_applicable_errata and bulk_installable_errata calls into a small helper to reduce duplication and improve test readability.
- Add a polling or wait step after publishing and promoting the content view to ensure the new version is available before refreshing the host and asserting installability, to avoid flakiness.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13425
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_errata.py -k test_positive_erratum_applicable_vs_installable --external-logging
Test Result : =========== 1 failed, 16 deselected, 5 warnings in 838.60s (0:13:58) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Nov 6, 2025
@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 6, 2025

PRT Result

Build Number: 13425
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_errata.py -k test_positive_erratum_applicable_vs_installable --external-logging
Test Result : =========== 1 failed, 16 deselected, 5 warnings in 838.60s (0:13:58) ===========

The PRT failure is related to removal of is_sca_mode_enabled from #19931 merged yesterday.

Copy link
Contributor

@sambible sambible left a comment

Choose a reason for hiding this comment

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

Test looks good, lets add that second host and verify installable and applicable both are visible in the bulk API, and then we can merge.

@vsedmik
Copy link
Contributor Author

vsedmik commented Nov 13, 2025

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py -k test_positive_bulk_erratum_applicable_vs_installable
nailgun: 1375

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13476
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_errata.py -k test_positive_bulk_erratum_applicable_vs_installable --external-logging
Test Result : =========== 1 passed, 16 deselected, 5 warnings in 842.24s (0:14:02) ===========

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Nov 13, 2025
@vsedmik vsedmik requested a review from sambible November 13, 2025 18:02
@LadislavVasina1 LadislavVasina1 self-requested a review November 19, 2025 09:19
Copy link
Contributor

@LadislavVasina1 LadislavVasina1 left a comment

Choose a reason for hiding this comment

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

LGTM, PRT passing

@LadislavVasina1 LadislavVasina1 added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Nov 19, 2025
@LadislavVasina1 LadislavVasina1 merged commit 86b6acd into SatelliteQE:master Nov 19, 2025
13 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 19, 2025
* Add coverage for bulk errata endpoints

* Extend the test case with another contenthost

(cherry picked from commit 86b6acd)
@vsedmik vsedmik deleted the bulk-errata branch November 19, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.18.z Introduced in or relating directly to Satellite 6.18 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 Stream Introduced in or relating directly to Satellite Stream/Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants