-
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): migrate test_replica_rebuild_per_volume_limit
Signed-off-by: Yang Chiu <[email protected]>
- Loading branch information
Showing
6 changed files
with
160 additions
and
28 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
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,51 @@ | ||
*** Settings *** | ||
Documentation Replica Test Cases | ||
Test Tags regression | ||
|
||
Resource ../keywords/common.resource | ||
Resource ../keywords/volume.resource | ||
Resource ../keywords/setting.resource | ||
Resource ../keywords/deployment.resource | ||
Resource ../keywords/persistentvolumeclaim.resource | ||
Resource ../keywords/workload.resource | ||
|
||
Test Setup Set test environment | ||
Test Teardown Cleanup test resources | ||
|
||
*** Variables *** | ||
${LOOP_COUNT} 1 | ||
${RETRY_COUNT} 300 | ||
${RETRY_INTERVAL} 1 | ||
${DATA_ENGINE} v1 | ||
|
||
*** Test Cases *** | ||
Test Replica Rebuilding Per Volume Limit | ||
[Tags] coretest | ||
[Documentation] Test the volume always only have one replica scheduled for rebuild | ||
... | ||
... 1. Set soft anti-affinity to `true`. | ||
... 2. Create a volume with 1 replica. | ||
... 3. Attach the volume and write a few hundreds MB data to it. | ||
... 4. Scale the volume replica to 5. | ||
... 5. Monitor the volume replica list to make sure there should be only 1 replica in WO state. | ||
... 6. Wait for the volume to complete rebuilding. Then remove 4 of the 5 replicas. | ||
... 7. Monitoring the volume replica list again. | ||
... 8. Once the rebuild was completed again, verify the data checksum. | ||
Given Set setting replica-soft-anti-affinity to true | ||
And Create volume 0 with numberOfReplicas=3 dataEngine=${DATA_ENGINE} | ||
And Attach volume 0 | ||
And Wait for volume 0 healthy | ||
And Write data to volume 0 | ||
|
||
When Update volume 0 replica count to 5 | ||
Then Only one replica rebuilding will start at a time for volume 0 | ||
And Monitor only one replica rebuilding will start at a time for volume 0 | ||
And Wait until volume 0 replicas rebuilding completed | ||
|
||
When Delete 4 replicas of volume 0 | ||
Then Only one replica rebuilding will start at a time for volume 0 | ||
And Monitor only one replica rebuilding will start at a time for volume 0 | ||
And Wait until volume 0 replicas rebuilding completed | ||
And Wait for volume 0 healthy | ||
And Check volume 0 data is intact |