diff options
author | Amar Tumballi <amar@gluster.com> | 2012-01-11 22:55:51 -0800 |
---|---|---|
committer | Gerrit Code Review <root@dev.gluster.com> | 2012-01-11 22:55:51 -0800 |
commit | 998550d430213f0bdf216ec8126cf9978b69a989 (patch) | |
tree | e8aec62bc5743a030862bb3c0abd120e4bb11f7a /dvm/765251/testcase | |
parent | 134266e7d000fb94b32f193fa5025488ed6f1efa (diff) | |
parent | 9f049094fcce37aff4e8cc45317b0d8dfc3e1560 (diff) |
Merge "Check if geo-rep log-rotate works fine"
Diffstat (limited to 'dvm/765251/testcase')
-rwxr-xr-x | dvm/765251/testcase | 45 |
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 |