File: test.t

package info (click to toggle)
glusterfs 11.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 28,244 kB
  • sloc: ansic: 471,238; sh: 45,610; python: 16,893; perl: 3,328; makefile: 2,014; yacc: 487; ruby: 171; lisp: 124; xml: 75; lex: 61
file content (44 lines) | stat: -rw-r--r-- 1,109 bytes parent folder | download | duplicates (3)
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

. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc

cleanup

TEST mkdir -p $B0/1/.glusterfs/vols/
TEST cp $(dirname $0)/brick.vol $B0/
TEST sed -i -e "s#BRICK#${B0}/1#g" $B0/brick.vol

TEST glusterfsd -f $B0/brick.vol -LDEBUG

TEST cp $(dirname $0)/client.vol $B0/1/.glusterfs/vols/
TEST ! glusterfs -s localhost:24011 --volfile-id client $M0

mount_result=$(mount | grep fuse.glusterfs | grep -q "$M0 " && echo True || echo False)

TEST [ $mount_result == "False" ]

TEST sed -i -e 's/#option/option/g'  $B0/brick.vol

TEST pkill -HUP glusterfsd

# give 1 second for graph switch and other such things to happen
sleep 1

TEST glusterfs -s localhost:24011 --volfile-id client -l/tmp/volspec.log $M0

mount_result=$(mount | grep fuse.glusterfs | grep -q "$M0 " && echo True || echo False)

TEST [ $mount_result == "True" ]
#sleep 1
TEST pkill -HUP glusterfsd

# allow time to get event
sleep 1

volfile_changed=$(grep -q "Volume file changed" /tmp/volspec.log && echo True || echo False)
TEST [ $volfile_changed == "True" ]

# Grep in logs to find 'Volfile changed' message

cleanup