-
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(negative): implement force drain node
Signed-off-by: Yang Chiu <[email protected]>
- Loading branch information
Showing
9 changed files
with
163 additions
and
34 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
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,53 @@ | ||
*** Settings *** | ||
Documentation Negative Test Cases | ||
Resource ../keywords/common.resource | ||
Resource ../keywords/persistentvolumeclaim.resource | ||
Resource ../keywords/k8s.resource | ||
Resource ../keywords/deployment.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 | ||
|
||
*** Test Cases *** | ||
Force Drain Volume Node While Replica Rebuilding | ||
Given Create persistentvolumeclaim 0 using RWO volume | ||
And Create deployment 0 with persistentvolumeclaim 0 | ||
And Wait for volume of deployment 0 healthy | ||
And Write 2048 MB data to file data.txt in deployment 0 | ||
|
||
FOR ${i} IN RANGE ${LOOP_COUNT} | ||
When Delete replica of deployment 0 volume on volume node | ||
And Wait until volume of deployment 0 replica rebuilding started on volume node | ||
And Force drain volume of deployment 0 volume node | ||
|
||
Then Wait for volume of deployment 0 attached to another node and degraded | ||
And Uncordon the drained node | ||
And Wait for volume of deployment 0 attached and healthy | ||
And Wait for deployment 0 pods stable | ||
And Check deployment 0 data in file data.txt is intact | ||
END | ||
|
||
Force Drain Replica Node While Replica Rebuilding | ||
Given Create persistentvolumeclaim 0 using RWO volume | ||
And Create deployment 0 with persistentvolumeclaim 0 | ||
And Wait for volume of deployment 0 healthy | ||
And Write 2048 MB data to file data.txt in deployment 0 | ||
|
||
FOR ${i} IN RANGE ${LOOP_COUNT} | ||
When Delete replica of deployment 0 volume on replica node | ||
And Wait until volume of deployment 0 replica rebuilding started on replica node | ||
And Force drain volume of deployment 0 replica node | ||
|
||
Then Wait for volume of deployment 0 attached to the original node and degraded | ||
And Uncordon the drained node | ||
And Wait for volume of deployment 0 attached and healthy | ||
And Wait for deployment 0 pods stable | ||
And Check deployment 0 data in file data.txt is intact | ||
END |
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