Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(robot): fix pull backup created by another longhorn system test case for v2 volumes #2198

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions e2e/keywords/common.resource
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ Library ../libs/keywords/sharemanager_keywords.py
Library ../libs/keywords/k8s_keywords.py

*** Keywords ***
Set test environment
init_k8s_api_client

setup_control_plane_network_latency
set_backupstore

Set up v2 environment
update_setting v2-data-engine true
${worker_nodes}= get_worker_nodes
${host_provider}= Get Environment Variable HOST_PROVIDER
Expand All @@ -38,6 +33,12 @@ Set test environment
add_disk block-disk ${worker_node} block ${disk_path}
END

Set test environment
init_k8s_api_client
setup_control_plane_network_latency
set_backupstore
set_up_v2_environment

Comment on lines +36 to +41
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix typo in function call

There's a typo in the function call on line 40:

-    set_up_v2_environment
+    Set up v2 environment

The function name should match the keyword definition above (using spaces instead of underscores).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Set test environment
init_k8s_api_client
setup_control_plane_network_latency
set_backupstore
set_up_v2_environment
Set test environment
init_k8s_api_client
setup_control_plane_network_latency
set_backupstore
Set up v2 environment

Cleanup test resources
FOR ${powered_off_node} IN @{powered_off_nodes}
Run keyword And Ignore Error power_on_node_by_name ${powered_off_node}
Expand Down
3 changes: 3 additions & 0 deletions e2e/tests/negative/pull_backup_from_another_longhorn.robot
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Pull Backup Created By Another Longhorn System
Then Install Longhorn
And Set setting deleting-confirmation-flag to true
And Set backupstore
And Set up v2 environment
And Check backup synced from backupstore
And Create volume 1 from backup 0 in another cluster
And Wait for volume 1 detached
Expand All @@ -72,6 +73,7 @@ Pull Backup Created By Another Longhorn System
Then Install Longhorn stable version
And Set setting deleting-confirmation-flag to true
And Set backupstore
And Set up v2 environment
And Create volume 2 with dataEngine=${DATA_ENGINE}
And Attach volume 2
And Wait for volume 2 healthy
Expand All @@ -85,6 +87,7 @@ Pull Backup Created By Another Longhorn System
# Install current version then pull backup and verify data
Then Install Longhorn
And Set backupstore
And Set up v2 environment
And Check backup synced from backupstore
And Create volume 3 from backup 1 in another cluster
And Wait for volume 3 detached
Expand Down
Loading