-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(robot): add test case Migration Confirmation After Migration Nod…
…e Down Signed-off-by: Yang Chiu <[email protected]>
- Loading branch information
Showing
17 changed files
with
192 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
*** Settings *** | ||
Documentation Migration Keywords | ||
Library ../libs/keywords/common_keywords.py | ||
Library ../libs/keywords/engine_keywords.py | ||
Library ../libs/keywords/replica_keywords.py | ||
|
||
*** Keywords *** | ||
Get volume ${volume_id} engine name | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${engine_name} = get_engine_name ${volume_name} | ||
Set Test Variable ${engine_name} | ||
|
||
Volume ${volume_id} engine should be the same | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${new_engine_name} = get_engine_name ${volume_name} | ||
Should Be Equal ${engine_name} ${new_engine_name} | ||
|
||
Volume ${volume_id} engine should be different | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${new_engine_name} = get_engine_name ${volume_name} | ||
Should Not Be Equal ${engine_name} ${new_engine_name} | ||
|
||
Get volume ${volume_id} replica names | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${replica_names} = get_replica_names ${volume_name} | ||
Set Test Variable ${replica_names} | ||
|
||
Volume ${volume_id} replicas should be the same | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${new_replica_names} = get_replica_names ${volume_name} | ||
Should Be Equal As Strings ${replica_names} ${new_replica_names} | ||
|
||
Volume ${volume_id} replicas should be different | ||
${volume_name} = generate_name_with_suffix volume ${volume_id} | ||
${new_replica_names} = get_replica_names ${volume_name} | ||
Should Not Be Equal As Strings ${replica_names} ${new_replica_names} | ||
|
||
Get volume ${volume_id} engine and replica names | ||
Get volume ${volume_id} engine name | ||
Get volume ${volume_id} replica names | ||
|
||
Volume ${volume_id} migration should fail or rollback | ||
Volume ${volume_id} engine should be the same | ||
Volume ${volume_id} replicas should be the same | ||
|
||
Volume ${volume_id} migration should succeed | ||
Volume ${volume_id} engine should be different | ||
Volume ${volume_id} replicas should be different |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
*** Settings *** | ||
Documentation Negative Test Cases | ||
Test Tags negative | ||
|
||
Resource ../keywords/variables.resource | ||
Resource ../keywords/common.resource | ||
Resource ../keywords/volume.resource | ||
Resource ../keywords/host.resource | ||
Resource ../keywords/migration.resource | ||
|
||
Test Setup Set test environment | ||
Test Teardown Cleanup test resources | ||
|
||
|
||
*** Test Cases *** | ||
Migration Confirmation After Migration Node Down | ||
Given Create volume 0 with migratable=True accessMode=RWX dataEngine=${DATA_ENGINE} | ||
And Attach volume 0 to node 0 | ||
And Wait for volume 0 healthy | ||
And Write data to volume 0 | ||
And Get volume 0 engine and replica names | ||
|
||
And Attach volume 0 to node 1 | ||
And Wait for volume 0 migration to be ready | ||
|
||
# power off migration node | ||
When Power off node 1 | ||
# migration confirmation by detaching from the original node | ||
And Detach volume 0 from node 0 | ||
|
||
# volume stuck in attaching status and waiting for migration node to come back | ||
Then Check volume 0 kept in attaching | ||
And Volume 0 migration should fail or rollback | ||
|
||
# power on migration node | ||
When Power on off nodes | ||
|
||
Then Wait for volume 0 to migrate to node 1 | ||
And Wait for volume 0 healthy | ||
And Check volume 0 data is intact |
This file contains 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
This file contains 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