Porting pytest/test_0_storage_network to robot#2719
Draft
albinsun wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports the pytest test_0_storage_network suite to Robot Framework and expands the Robot storage-network keywords to validate enable/disable status from both Harvester setting (config) and Longhorn instance-manager pods (service). It also introduces cluster-scoped CRD helper functions and adds CRD-based cleanup keywords for network-related test resources.
Changes:
- Add a new Robot regression suite for enabling/disabling storage network and validating status.
- Replace the previous “wait for storage network ready” flow with explicit enable/disable checks in config and pods.
- Add cluster-scoped CRD helpers and CRD-based cleanup for VLAN networks/configs and cluster networks.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| harvester_robot_tests/tests/regression/test_0_storage_network.robot | New Robot regression suite ported from pytest for storage network enable/disable. |
| harvester_robot_tests/libs/utility/utility.py | Update unique name generator to support “general” vs “precise” timestamps. |
| harvester_robot_tests/libs/storage_network/storage_network.py | Remove deprecated wait API from wrapper layer. |
| harvester_robot_tests/libs/storage_network/rest.py | Remove deprecated wait API from REST implementation. |
| harvester_robot_tests/libs/storage_network/crd.py | Remove deprecated wait API from CRD implementation. |
| harvester_robot_tests/libs/storage_network/base.py | Remove abstract wait API from storage network base interface. |
| harvester_robot_tests/libs/network/rest.py | Add REST cleanup method stubs for network resources. |
| harvester_robot_tests/libs/network/network.py | Expose new cleanup methods via the Network delegator. |
| harvester_robot_tests/libs/network/crd.py | Add labels + list/cleanup functions and deletion waits for cluster/VLAN resources. |
| harvester_robot_tests/libs/network/base.py | Add abstract cleanup methods for cluster networks, VLAN configs, VLAN networks. |
| harvester_robot_tests/libs/keywords/storage_network_keywords.py | Add config/pod validation and wait loops for storage network enable/disable. |
| harvester_robot_tests/libs/keywords/common_keywords.py | Wire common teardown network cleanup to Network cleanup methods; extend name generator args. |
| harvester_robot_tests/libs/crd.py | Add cluster-scoped CRD CRUD/wait helpers. |
| harvester_robot_tests/keywords/storage_network.resource | Update Robot keywords to use new enable/disable checks and waits. |
| harvester_robot_tests/keywords/rancher.resource | Switch storage network waiting to the new “Wait For Enabled” keyword (needs argument fix). |
| harvester_robot_tests/keywords/common.resource | Extend Generate Unique Name keyword and update examples (doc text needs alignment). |
| harvester_e2e_tests/integrations/test_0_storage_network.py | Mark pytest tests as robot-ported. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Albin Sun <albin.sun@suse.com>
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:
What this PR does / why we need it:
Feature
vlan_networks,vlan_configsandcluster_networksEnhancement
Generate Unique Namesupport both general and precise purposesSpecial notes for your reviewer:
Additional documentation or context