summaryrefslogtreecommitdiffstats
path: root/dvm/2503
diff options
context:
space:
mode:
Diffstat (limited to 'dvm/2503')
-rwxr-xr-xdvm/2503/testcase40
1 files changed, 40 insertions, 0 deletions
diff --git a/dvm/2503/testcase b/dvm/2503/testcase
new file mode 100755
index 0000000..c6e6deb
--- /dev/null
+++ b/dvm/2503/testcase
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+mkdir -p /tmp/$global_bug_id
+#create,start and mount
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 &>/dev/null ;
+
+$GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null;
+mount_glusterfs $global_bug_id
+
+mkdir $FUSE_MOUNT/dir
+for i in {1..10};do
+ touch $FUSE_MOUNT/dir/$i.txt
+done
+
+sleep 2;
+
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null
+sleep 2;
+$GLUSTERFSDIR/gluster volume rebalance $global_bug_id start &> /dev/null
+sleep 10;
+rm -rf $FUSE_MOUNT/dir/*
+sleep 2;
+$GLUSTERFSDIR/gluster --mode=script volume remove-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null
+sleep 10;
+
+for i in {1..10}; do
+ touch $FUSE_MOUNT/dir/$i.txt
+done
+if [ `ls $FUSE_MOUNT/dir | wc -l` -eq 10 ]; then
+ rm -rf $FUSE_MOUNT/dir/*;
+ if [ $? -eq 0 ]; then
+ exit 0;
+ else
+ exit 127;
+ fi
+else
+ exit 127;
+fi