Skip to content

Verifies the Create, Read, Update, and Delete operations for the OCPV… - #20978

Merged
shubhamsg199 merged 1 commit into
SatelliteQE:masterfrom
amolpati30:OCPV_compute_resource_crud_operation
Mar 11, 2026
Merged

Verifies the Create, Read, Update, and Delete operations for the OCPV…#20978
shubhamsg199 merged 1 commit into
SatelliteQE:masterfrom
amolpati30:OCPV_compute_resource_crud_operation

Conversation

@amolpati30

@amolpati30 amolpati30 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

OCPV Compute Resource CRUD Operation verifies the Create, Read, Update, and Delete operations for the OCPV compute resource.
It ensures that the compute resource can be properly managed and validated through the system using UI interface.

Dependent: SatelliteQE/airgun#2327

Summary by Sourcery

Tests:

  • Introduce an end-to-end test that validates create, read, update, and delete flows for the OCP-V compute resource including org/location assignments.

@amolpati30 amolpati30 added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.19.z labels Mar 9, 2026
@sourcery-ai

sourcery-ai Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds an end-to-end UI test that verifies full CRUD (Create, Read, Update, Delete) behavior for the OpenShift Virtualization (OCP-V) compute resource, including provider configuration and organization/location assignments.

File-Level Changes

Change Details Files
Add an end-to-end CRUD UI test for OCP-V compute resources.
  • Introduce a pytest-marked e2e test that creates an OCP-V compute resource via the UI with provider and scoping settings.
  • Verify the created compute resource fields (name, description, provider, hostname, api_port, namespace, orgs, locations) via a read operation.
  • Update the compute resource by renaming it and assigning additional organization/location, then verify the merged assignments.
  • Delete the compute resource and assert it can no longer be found via search.
tests/foreman/ui/test_computeresource_ocpv.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the UPDATE step you pass only [new_org.name]/[new_loc.name] to organizations.resources.assigned and locations.resources.assigned but then assert that both the original and new org/location are assigned; if the UI/API behavior is to replace rather than merge, this test will be brittle—either explicitly include both in the payload or adjust the assertions to match the intended semantics.
  • The test creates additional organizations/locations via module_ocpv_sat.api.Organization().create() and .Location().create() without any explicit cleanup, which can leave persistent test data behind; consider using a fixture or context that ensures these resources are deleted after the test.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the UPDATE step you pass only `[new_org.name]`/`[new_loc.name]` to `organizations.resources.assigned` and `locations.resources.assigned` but then assert that both the original and new org/location are assigned; if the UI/API behavior is to replace rather than merge, this test will be brittle—either explicitly include both in the payload or adjust the assertions to match the intended semantics.
- The test creates additional organizations/locations via `module_ocpv_sat.api.Organization().create()` and `.Location().create()` without any explicit cleanup, which can leave persistent test data behind; consider using a fixture or context that ensures these resources are deleted after the test.

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.

@amolpati30

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_computeresource_ocpv.py -k test_positive_cr_end_to_end
airgun: 2327

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14667
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_computeresource_ocpv.py -k test_positive_cr_end_to_end --external-logging
Test Result : =========== 1 passed, 1 deselected, 9 warnings in 1678.56s (0:27:58) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 9, 2026
@amolpati30
amolpati30 requested review from a team, Satellite-QE, sambible and shubhamsg199 and removed request for Satellite-QE March 10, 2026 09:15
@shubhamsg199
shubhamsg199 merged commit a7a8001 into SatelliteQE:master Mar 11, 2026
13 checks passed
'organizations.resources.assigned': [module_org.name],
'locations.resources.assigned': [module_location.name],
}
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am missing the "test connection" button here. I didn't see it being invoked in the airgun too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We are not checking the test connection here, as it only ensures that the connection has been established correctly. Therefore, I did not use it while creating the compute resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants