Porting pytest/test_0_storage_network to robot#2719
Conversation
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 <[email protected]>
|
Tick the box to add this pull request to the merge queue (same as
|
khushboo-rancher
left a comment
There was a problem hiding this comment.
This looks great and thanks for fixing many things (network etc) along with the storage network imlpementation.
|
@albinsun Is it possible to add a test case about creating VM with storage network also in addition of enable & disable checks? |
Will try to add it in later PR. |
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