summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdvm/765251/testcase45
1 files changed, 45 insertions, 0 deletions
diff --git a/dvm/765251/testcase b/dvm/765251/testcase
new file mode 100755
index 0000000..dafedf2
--- /dev/null
+++ b/dvm/765251/testcase
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+source $cwd/regression_helpers;
+mkdir -p /tmp/file$global_bug_id &> /dev/null;
+
+function assert ()
+{
+ if [ $1 -ne 0 ]; then
+ rm -rf /tmp/file$global_bug_id &> /dev/null;
+ exit 255;
+ fi
+}
+#create, start volume
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null;
+
+$GLUSTERFSDIR/gluster volume start $global_bug_id &> /dev/null;
+
+sleep 10;
+
+#start gsyncd
+$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/file$global_bug_id start &> /dev/null;
+assert $?;
+
+sleep 10;
+ps aux|grep gsyncd.py | grep monitor &> /dev/null;
+assert $?;
+
+val=`$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/file$global_bug_id config | grep "^log_file" | cut -f2 -d' '` &> /dev/null;
+sleep 5;
+
+$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/file$global_bug_id log-rotate &> /dev/null;
+assert $?;
+
+sleep 5;
+
+ret=`ls -l $val* | wc -l`
+$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/file$global_bug_id stop &> /dev/null;
+rm -rf /tmp/file$global_bug_id &> /dev/null;
+rm -rf $val*
+
+if [ $ret -ne 2 ]; then
+ exit 255;
+else
+ exit 0;
+fi