Skip to content

Commit

Permalink
test(robot): fix pull backup created by another longhorn system test …
Browse files Browse the repository at this point in the history
…case for v2 volumes

by re-setting up v2 environment after reinstallation

Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed Dec 16, 2024
1 parent 6d767dc commit 92b772a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
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

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

0 comments on commit 92b772a

Please sign in to comment.