glusterfs
73 строки · 1.4 Кб
1#!/bin/bash
2
3. $(dirname $0)/../include.rc4. $(dirname $0)/../volume.rc5
6cleanup;7
8TEST mkdir -p $B0/test9cat > $B0/test.vol <<EOF10volume test
11type storage/posix
12option directory $B0/test13option multiple-line-string "I am
14testing a feature of volfile graph.l"
15option single-line-string "this is running on $H0"16option option-with-back-tick `date +%Y%M%d`17end-volume
18EOF
19
20# This should succeed, but it will have some unknown options, which is OK.
21TEST glusterfs -f $B0/test.vol $M0;22
23EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0;24
25# This should not succeed
26cat > $B0/test.vol <<EOF27volume test
28type storage/posix
29EOF
30TEST ! glusterfs -f $B0/test.vol $M0;31
32
33# This should not succeed
34cat > $B0/test.vol <<EOF35type storage/posix
36end-volume
37EOF
38TEST ! glusterfs -f $B0/test.vol $M0;39
40# This should not succeed
41cat > $B0/test.vol <<EOF42volume test
43end-volume
44EOF
45TEST ! glusterfs -f $B0/test.vol $M0;46
47# This should not succeed
48cat > $B0/test.vol <<EOF49volume test
50option test and test
51end-volume
52EOF
53TEST ! glusterfs -f $B0/test.vol $M0;54
55# This should not succeed
56cat > $B0/test.vol <<EOF57volume test
58subvolumes
59end-volume
60EOF
61TEST ! glusterfs -f $B0/test.vol $M0;62
63# This should not succeed
64cat > $B0/test.vol <<EOF65volume test
66type storage/posix
67new-option key value
68option directory $B0/test69end-volume
70EOF
71TEST ! glusterfs -f $B0/test.vol $M0;72
73cleanup;74