Automation to support MultiCV bulk update#20755
Merged
vijaysawant merged 2 commits intoSatelliteQE:masterfrom Feb 11, 2026
Merged
Automation to support MultiCV bulk update#20755vijaysawant merged 2 commits intoSatelliteQE:masterfrom
vijaysawant merged 2 commits intoSatelliteQE:masterfrom
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the bulk CVE reassignment UI test for hosts to be resilient to MultiCV changes by explicitly managing the Lifecycle environment column, validating pre/post states, using the new manage_cve API, and ensuring table column cleanup via a finally block. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The new try/finally cleanup always hides the
Lifecycle environmentcolumn at the end of the test, even if it was originally visible; consider tracking the initial column visibility and restoring it to its original state instead of unconditionally setting it toFalse. - The change from
manage_cve(lce=..., cv=...)tomanage_cve(lce_name=..., cv_name=...)suggests a method signature update; if this is intended to be compatible with older airgun versions, consider keeping or shimming the old parameter names to avoid breaking existing callers.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new try/finally cleanup always hides the `Lifecycle environment` column at the end of the test, even if it was originally visible; consider tracking the initial column visibility and restoring it to its original state instead of unconditionally setting it to `False`.
- The change from `manage_cve(lce=..., cv=...)` to `manage_cve(lce_name=..., cv_name=...)` suggests a method signature update; if this is intended to be compatible with older airgun versions, consider keeping or shimming the old parameter names to avoid breaking existing callers.
## Individual Comments
### Comment 1
<location> `tests/foreman/ui/test_host.py:2088-2091` </location>
<code_context>
+ post_table = session.all_hosts.read_table()
+ for row in post_table:
+ assert row['Lifecycle environment'] == lce2.name
+ finally:
session.all_hosts.manage_table_columns(
{
- 'Lifecycle environment': True,
+ 'Lifecycle environment': False,
}
)
</code_context>
<issue_to_address>
**issue (testing):** Restore the original column visibility rather than always disabling the `Lifecycle environment` column
The new `finally` block always hides the `Lifecycle environment` column, even if it was visible beforehand, which can make tests order-dependent and affect later UI tests. Instead, capture the column’s initial visibility before the `try` and restore that exact state in `finally` (e.g., read `headers`, compute a boolean, and pass it to `manage_table_columns` during cleanup).
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
Collaborator
|
PRT Result |
LadislavVasina1
approved these changes
Feb 10, 2026
vijaysawant
requested changes
Feb 10, 2026
Contributor
vijaysawant
left a comment
There was a problem hiding this comment.
requested small nitpick change, rest of things looks good.
Co-authored-by: Vijaykumar Sawant <visawant@redhat.com>
Contributor
Author
|
trigger: test-robottelo |
Collaborator
|
PRT Result |
vijaysawant
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Statement
Due to addition of new MutiCV feature, existing flow to bulk update
Manage content->Content view environmentswas breakingSolution
Added automation to support MultiCV bulk update
Manage content->Content view environmentsRelated Issues
Its part of card : https://issues.redhat.com/browse/SAT-631
Airgun PR :SatelliteQE/airgun#2308
PRT test Cases example
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k test_all_hosts_bulk_cve_reassign
airgun: 2308
Summary by Sourcery
Tests: