summaryrefslogtreecommitdiffstats
path: root/dvm/764072/testcase
blob: 374882081331701bb2976a33a89314490fc52d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

source $cwd/regression_helpers
mkdir -p /tmp/$global_bug_id &> /dev/null

#create,start and mount
$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;
mount_glusterfs $global_bug_id;

sleep 10;
#start gsyncd first
$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id start &> /dev/null
if [ $? -ne 0 ]; then
    exit 255;
fi

sleep 10;

ps aux | grep gsyncd.py | grep monitor &> /dev/null;
if [ $? -ne 0 ]; then
    exit 255;
fi

mkdir -p $FUSE_MOUNT/dir/dir{1..2};
touch $FUSE_MOUNT/file{1..2};

sleep 5;

ls -l $FUSE_MOUNT/* &> /dev/null;

sleep 5;

ps aux | grep gsyncd.py | grep monitor &> /dev/null;
if [ $? -ne 0 ]; then
    $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null
    rm -rf /tmp/$global_bug_id &> /dev/null
    exit 255;
else
    $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null
    rm -rf /tmp/$global_bug_id &> /dev/null
    exit 0;
fi