summaryrefslogtreecommitdiffstats
path: root/tests/line-coverage/volfile-with-all-graph-syntax.t
blob: b137432cceb2a2daa19b96fad7a6b92e5c97f7bf (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash

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

cleanup;

TEST mkdir -p $B0/test
cat > $B0/test.vol <<EOF
volume test
  type storage/posix
  option directory $B0/test
  option multiple-line-string "I am
 testing a feature of volfile graph.l"
  option single-line-string "this is running on $H0"
  option option-with-back-tick `date +%Y%M%d`
end-volume
EOF

# This should succeed, but it will have some unknown options, which is OK.
TEST glusterfs -f $B0/test.vol $M0;

EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0;

# This should not succeed
cat > $B0/test.vol <<EOF
volume test
  type storage/posix
EOF
TEST ! glusterfs -f $B0/test.vol $M0;


# This should not succeed
cat > $B0/test.vol <<EOF
  type storage/posix
end-volume
EOF
TEST ! glusterfs -f $B0/test.vol $M0;

# This should not succeed
cat > $B0/test.vol <<EOF
volume test
end-volume
EOF
TEST ! glusterfs -f $B0/test.vol $M0;

# This should not succeed
cat > $B0/test.vol <<EOF
volume test
  option test and test
end-volume
EOF
TEST ! glusterfs -f $B0/test.vol $M0;

# This should not succeed
cat > $B0/test.vol <<EOF
volume test
  subvolumes
end-volume
EOF
TEST ! glusterfs -f $B0/test.vol $M0;

# This should not succeed
cat > $B0/test.vol <<EOF
volume test
  type storage/posix
  new-option key value
  option directory $B0/test
end-volume
EOF
TEST ! glusterfs -f $B0/test.vol $M0;

cleanup;