-
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.
add test case for bug 2369 and use bug id as the volume name in all t…
…estcases Signed-off-by: Vijay Bellur <[email protected]>
- Loading branch information
1 parent
ff62dce
commit 7b57d9f
Showing
4 changed files
with
47 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
source ./regression_helpers | ||
|
||
$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 2>/dev/null 1>/dev/null; | ||
|
||
$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; | ||
|
||
mount_glusterfs $global_bug_id; | ||
|
||
sleep 2; | ||
|
||
touch $FUSE_MOUNT/{1..22}; | ||
chown 1315:1315 $FUSE_MOUNT/{1..22}; | ||
|
||
mkdir $EXPORT_DIR/$global_bug_id/export2; | ||
|
||
$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null; | ||
|
||
$GLUSTERFSDIR/gluster volume rebalance $global_bug_id start 2>/dev/null 1>/dev/nullx; | ||
|
||
status=0; | ||
while [ $status -ne 1 ] | ||
do | ||
status=$($GLUSTERFSDIR/gluster volume rebalance $global_bug_id status | grep "rebalance completed" | wc -l); | ||
sleep 1; | ||
done | ||
|
||
ret=0; | ||
for entries in $(ls $EXPORT_DIR/$global_bug_id/export2) | ||
do | ||
if [ $(stat --printf=%u $EXPORT_DIR/$global_bug_id/export2/$entries | grep 1315 | wc -l) -ne 1 ]; then | ||
ret=22; | ||
break; | ||
fi | ||
done | ||
|
||
defrag=$(mount | grep /etc/glusterd/mount/$global_bug_id | wc -l); | ||
if [ $defrag -eq 1 ]; then | ||
umount /etc/glusterd/mount/$global_bug_id 2>/dev/null 1>/dev/null; | ||
fi | ||
|
||
exit $ret; |