forked from openebs/openebs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TA2761] feat(cstor vol): Add test script for cstor volume. (#519)
Added a bash script to test cstor volume covering both success and failure scenarios. 1. Test to check successful creation and deletion of a cstor volume. 2. Test to check if the volume creation fails when the requested replicas are more than available pools. 3. Test to check if volume is writeable when all the replica pools are restarted. 4. Test to check if the volume is writeable when the target pod is restarted. Reference: https://docs.google.com/document/d/15Ecf1ORhTeflCfrrkF-NB08727X9tUbYgGQxj2WP0_w/edit?usp=sharing Signed-off-by: Prince Rachit Sinha <[email protected]>
- Loading branch information
Showing
29 changed files
with
1,139 additions
and
0 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,11 @@ | ||
This is a test framework for cStor Volumes. This is only a validation on how to design actual testing framework for cstor volume. It includes test cases which should be later migrated to CITF. Some test cases are not yet covered feel free to add them. | ||
|
||
**How to use this script?** | ||
Clone this repo and cd to this directory. | ||
Configure operator and pool config yaml if required. | ||
Run `bash vol-test.sh -o openebs-operator.yaml -p openebs-config.yaml` | ||
|
||
**Important notes** | ||
> It is assumed that there are at lease three nodes and each one of them has at least one external disk attached. | ||
> The kubectl should be in admin context. | ||
> The cluster is clean i.e. no existing openebs installation exists. |
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,19 @@ | ||
#!bin/bash | ||
source ./util.sh | ||
echo -e ${GREEN}REMOVING OPENEBS${NC} | ||
|
||
if [ "$POOL_FILE" == "" ]; then | ||
POOL_FILE="openebs-config.yaml" | ||
fi | ||
|
||
if [ "$OP_FILE" == "" ]; then | ||
OP_FILE="openebs-operator.yaml" | ||
fi | ||
|
||
kubectl delete po -n openebs -l "openebs.io/persistent-volume-claim=openebs-pvc" --force --grace-period=0 | ||
|
||
kubectlDelete $POOL_FILE | ||
kubectlDelete $OP_FILE | ||
|
||
kubectl delete crd castemplates.openebs.io cstorpools.openebs.io cstorvolumereplicas.openebs.io cstorvolumes.openebs.io disks.openebs.io runtasks.openebs.io storagepoolclaims.openebs.io storagepools.openebs.io | ||
|
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,14 @@ | ||
apiVersion: openebs.io/v1alpha1 | ||
kind: StoragePoolClaim | ||
metadata: | ||
name: cstor-pool-default-0.7.0 | ||
spec: | ||
name: cstor-pool-default-0.7.0 | ||
type: disk | ||
maxPools: 3 | ||
poolSpec: | ||
poolType: striped | ||
# disks: | ||
# diskList: | ||
# - disk-4268137899842721d2d4fc0c16c3b138 | ||
# - disk-99cde73d1defa35375029e8164e974e0 |
Oops, something went wrong.