add some tests for the new harvester integration tests#2730
Draft
Vicente-Cheng wants to merge 5 commits into
Draft
add some tests for the new harvester integration tests#2730Vicente-Cheng wants to merge 5 commits into
Vicente-Cheng wants to merge 5 commits into
Conversation
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Harvester Robot Framework regression coverage (image + volume lifecycle) and updates the test runner/libs to reuse the shared apiclient/harvester_api with optional suite-level parallel execution and a selectable operation strategy (CRD vs REST).
Changes:
- Added new regression suites for volumes (basic/expand/snapshot) and images (basic + negative checksum/URL + optional valid checksum), and tagged a PR baseline set (
pr-baseline). - Updated the runner (
run.sh) to support pabot parallelism (-p) and strategy selection (-S), and documented these in the README. - Refactored VM/Image/Volume libraries to select CRD vs REST implementations via
HARVESTER_OPERATION_STRATEGY, added snapshot readiness support, and replaced the standalone client with an adapter around the sharedharvester_api.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| harvester_robot_tests/tests/regression/test_volume.robot | New basic PVC lifecycle regression suite (PR baseline). |
| harvester_robot_tests/tests/regression/test_volume_expand.robot | New PVC expansion regression suite (PR baseline). |
| harvester_robot_tests/tests/regression/test_volume_snapshot.robot | New PVC snapshot/restore regression suite (PR baseline). |
| harvester_robot_tests/tests/regression/test_vm.robot | Adds pr-baseline tag to basic VM regression suite. |
| harvester_robot_tests/tests/regression/test_image.robot | New image lifecycle regression suite (PR baseline). |
| harvester_robot_tests/tests/regression/test_image_valid_checksum.robot | New optional “valid checksum” image suite (PR baseline). |
| harvester_robot_tests/tests/regression/test_image_invalid_url.robot | New negative image suite for invalid URL (PR baseline). |
| harvester_robot_tests/tests/regression/test_image_invalid_checksum.robot | New negative image suite for invalid checksum (PR baseline). |
| harvester_robot_tests/run.sh | Adds -p pabot parallelism and -S strategy selection; updates runner behavior/help. |
| harvester_robot_tests/requirements.in | Adds robotframework-pabot dependency for parallel execution. |
| harvester_robot_tests/README.md | Documents parallel runs, CRD vs REST strategy, and the pr-baseline tag set. |
| harvester_robot_tests/libs/volume/volume.py | Selects CRD vs REST implementation by env var; exposes snapshot-ready API. |
| harvester_robot_tests/libs/volume/base.py | Updates volume interface for snapshot class + snapshot readiness. |
| harvester_robot_tests/libs/volume/crd.py | Aligns PVC access mode/mode, adds snapshot class + readiness wait, labels snapshot/restore resources. |
| harvester_robot_tests/libs/volume/rest.py | Reworks REST volume operations to use shared harvester_api managers and adds snapshot wait/cleanup. |
| harvester_robot_tests/libs/keywords/volume_keywords.py | Updates volume keyword layer for snapshot class + snapshot readiness. |
| harvester_robot_tests/keywords/volume.resource | Adds higher-level volume lifecycle + snapshot keywords used by new suites. |
| harvester_robot_tests/libs/vm/vm.py | Selects CRD vs REST implementation by env var. |
| harvester_robot_tests/libs/vm/rest.py | Aligns REST VM operations with shared client endpoints/behaviors (image UID lookup, list/get, backup, etc.). |
| harvester_robot_tests/libs/image/image.py | Selects CRD vs REST implementation by env var. |
| harvester_robot_tests/libs/image/crd.py | Improves CRD image state derivation to correctly report Failed vs Active/Importing. |
| harvester_robot_tests/libs/image/rest.py | Updates REST image listing call to match shared client. |
| harvester_robot_tests/keywords/image.resource | Adds list/existence/deletion/state helper keywords used by new image suites. |
| harvester_robot_tests/libs/utility/utility.py | Initializes the shared API client via the new adapter. |
| harvester_robot_tests/libs/utility/api_client.py | New adapter subclass to provide tuple-returning generic HTTP verbs. |
| harvester_robot_tests/libs/constant.py | Adds default VolumeSnapshotClass constant. |
| harvester_robot_tests/libs/harvester_api.py | Removes the standalone Robot client (replaced by shared apiclient). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+89
to
+90
| p) PROCESSES=$OPTARG ;; | ||
| S) STRATEGY=$OPTARG ;; |
| Available Tags: | ||
| Priority: p0, p1, p2 | ||
| Type: coretest, regression, negative, smoke, sanity | ||
| Component: virtualmachines, images, volumes, networks, backup, ha |
Comment on lines
+4
to
+5
| # Parallel test execution (suite-level) via `pabot` | ||
| robotframework-pabot>=2.16,<3 |
| """List all images""" | ||
| api = get_harvester_api_client() | ||
| code, data = api.images.list(namespace) | ||
| code, data = api.images.get("", namespace) |
1a7ad16 to
53a3c08
Compare
Author
|
cc @bk201 |
- include create/expand/snapshot/restore/delete
- add parameter that we can parallel run the test
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
- reuse the apiclient and add a new parameter to select strategy Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
- include create/list/delete/checksum/url Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
- it would be used for harvester integration, include the
VM/Image/Volume basic tests
Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
53a3c08 to
e652566
Compare
Author
|
Moved to draft since we might add some basic tests for the VM part. But for the current PR, it should work. |
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.
Which issue(s) this PR fixes:
Issue #
What this PR does / why we need it:
This PR aims for the following stuff:
Special notes for your reviewer:
Additional documentation or context
Here is the temporary output: