blob: b9f6dc715e67a33a5d1d88ad1867a8a8964b02ef (
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
|
#!/bin/bash
## Test case for BZ-1140160 Volume option set <vol> <file-snapshot> and
## <features.encryption> <value> command input should validate correctly.
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc
cleanup;
## Start glusterd
TEST glusterd;
TEST pidof glusterd;
## Lets create and start volume
TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2};
TEST $CLI volume start $V0
## Set features.file-snapshot and features.encryption option with non-boolean
## value. These options should fail.
TEST ! $CLI volume set $V0 features.file-snapshot abcd
TEST ! $CLI volume set $V0 features.encryption redhat
## Set other options with valid value. These options should succeed.
TEST $CLI volume set $V0 barrier enable
TEST $CLI volume set $V0 ping-timeout 60
## Set features.file-snapshot and features.encryption option with valid boolean
## value. These options should succeed.
TEST $CLI volume set $V0 features.file-snapshot on
## Before setting the crypt xlator on, it is required to create master key
## Otherwise glusterfs client process will fail to start
echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" > $GLUSTERD_WORKDIR/$V0-master-key
## Specify location of master key
TEST $CLI volume set $V0 encryption.master-key $GLUSTERD_WORKDIR/$V0-master-key
TEST $CLI volume set $V0 features.encryption on
cleanup;
|