Skip to content

Porting test_1_images.TestBackendImages - #2890

Open
albinsun wants to merge 2 commits into
harvester:mainfrom
albinsun:porting_test_1_images
Open

albinsun wants to merge 2 commits into
harvester:mainfrom
albinsun:porting_test_1_images

Conversation

@albinsun

@albinsun albinsun commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

What this PR does / why we need it:

  1. Porting pytest cases under test_1_images.py:TestBackendImages to robot
  2. Grouping image test by source: from_url, from_file or from_volume.
  3. Moving pr-baseline tag to test case self, thus keep the GH action selection for PR and also fits the source grouping.

Special notes for your reviewer:

  1. This PR covers test_1_images.py:TestBackendImages. TestImageWithStorageNetwork and TestImageEnhancements will be cover in later PRs.

Additional documentation or context

  • Also verified parallelly with command ./run.sh -s image -p 4
  • harvester-robot-tests#139
    image

Signed-off-by: Albin Sun <albin.sun@suse.com>

Copilot AI 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.

🟡 Changes recommended

The port omits the original successful file upload/re-upload regression scenario and excludes one migrated test from p0 runs.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Ports backend image tests to source-specific Robot Framework suites and extends image/volume keywords.

Changes:

  • Splits URL, file, and volume image tests into dedicated suites.
  • Adds REST-backed file upload and image/volume assertions.
  • Marks migrated pytest cases and relocates storage-network tests.
File summaries
File Description
tests/regression/storage_network/test_storage_network.robot Updates resource paths after relocation.
tests/regression/image/test_image.robot Removes the former combined image suite.
tests/regression/image/test_image_from_volume.robot Adds volume-export image coverage.
tests/regression/image/test_image_from_url.robot Adds URL lifecycle and metadata tests.
tests/regression/image/test_image_from_file.robot Adds invalid file-upload coverage.
libs/keywords/image_keywords.py Exposes file-upload functionality.
libs/image/rest.py Implements REST file upload.
libs/image/image.py Routes uploads through REST.
libs/image/crd.py Declares file uploads unsupported through CRD.
libs/image/base.py Adds the file-upload interface.
libs/image/__init__.py Defines the public image export.
keywords/volume.resource Adds reusable volume creation workflow.
keywords/image.resource Adds state, size, absence, and upload keywords.
keywords/common.resource Updates unique-name documentation.
integrations/test_1_images.py Marks backend image tests as Robot-ported.
Review details
  • Files reviewed: 15/15 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread harvester_robot_tests/keywords/common.resource Outdated
Comment thread harvester_robot_tests/tests/regression/image/test_image_from_volume.robot Outdated
Signed-off-by: Albin Sun <albin.sun@suse.com>
@albinsun
albinsun force-pushed the porting_test_1_images branch from fa1bac9 to 1cf8307 Compare September 16, 2026 01:53
@albinsun
albinsun requested review from a team and Vicente-Cheng September 16, 2026 01:57
@albinsun
albinsun marked this pull request as ready for review September 16, 2026 02:01
@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@Vicente-Cheng Vicente-Cheng 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.

Some nits, please also update the README with these PR changes.
thanks!


*** Test Cases ***
Create Image From Volume
[Tags] p0

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.

This is the generic case for the VM image. Could we also add this to the pr-baseline?

Create Image From Volume
[Tags] p0
[Documentation] Create an image from a 10Gi volume and verify its status and size
Given A 10Gi Volume is Created ${VOL_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.

do we really need 10Gi? If we would like to ensure the behavior, maybe 1Gi would be enough?

*** Keywords ***
Local Suite Setup
${suffix}= Generate Unique Name
Set Suite Variable ${VOL_NAME} vol-${SUFFIX}

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.

Suggested change
Set Suite Variable ${VOL_NAME} vol-${SUFFIX}
Set Suite Variable ${VOL_NAME} vol-${suffix}

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.

nit, it works, but it's better to align the format

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants