Skip to content

Porting pytest/test_0_storage_network to robot#2719

Draft
albinsun wants to merge 1 commit into
harvester:mainfrom
albinsun:py2rf_snet
Draft

Porting pytest/test_0_storage_network to robot#2719
albinsun wants to merge 1 commit into
harvester:mainfrom
albinsun:py2rf_snet

Conversation

@albinsun

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

What this PR does / why we need it:

Feature

  1. Porting pytest storage network test suite to robot
  2. Add test resources cleanup for vlan_networks, vlan_configs and cluster_networks

Enhancement

  1. Check storage network status for both config and pods
  2. Let Generate Unique Name support both general and precise purposes
  3. Add crd functions for cluster resources

Special notes for your reviewer:

Additional documentation or context

image

Copilot AI review requested due to automatic review settings June 18, 2026 03:17

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.

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.

Comment thread harvester_robot_tests/keywords/rancher.resource Outdated
Comment thread harvester_robot_tests/keywords/rancher.resource Outdated
Comment thread harvester_robot_tests/keywords/common.resource Outdated
Comment thread harvester_robot_tests/libs/keywords/common_keywords.py Outdated
Comment thread harvester_robot_tests/libs/network/rest.py
Comment thread harvester_robot_tests/libs/network/rest.py
Comment thread harvester_robot_tests/libs/network/rest.py
Comment thread harvester_robot_tests/libs/keywords/storage_network_keywords.py Outdated
Comment thread harvester_robot_tests/libs/keywords/storage_network_keywords.py Outdated
Comment thread harvester_robot_tests/libs/keywords/storage_network_keywords.py
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.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Comment thread harvester_robot_tests/tests/regression/test_0_storage_network.robot
Comment thread harvester_robot_tests/libs/crd.py
Comment thread harvester_robot_tests/libs/crd.py
Comment thread harvester_robot_tests/libs/crd.py
@albinsun albinsun marked this pull request as draft June 18, 2026 08:02
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.

2 participants