summaryrefslogtreecommitdiffstats
path: root/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
diff options
context:
space:
mode:
authorSaravanakumar Arumugam <sarumuga@redhat.com>2015-01-30 12:57:21 +0530
committerVijay Bellur <vbellur@redhat.com>2015-02-02 12:20:40 -0800
commit3622146ac06918069a5994ac0dfa02aa98de4d8f (patch)
treee1a74b805bd0b31c21cacca521df9c388a228b3c /tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
parent52765ad94f233e4b4e57515e49f5b7c9e7c08b43 (diff)
tests/snapshot: Avoid errors on make dist.
Problem: "make dist" gives the following error: tar: bug-1140162-file-snapshot-and-features-encryption-option-validation.t: file name is too long (max 99); not dumped Here, .t file is not getting included on the "make dist" tarball as file name is too long for the "tar" command. Result is, upon distributing the tests through the tarball, this particular test will not get run on the target system. Solution: Rename the file to a shorter one(less than 99) to avoid this error. Change-Id: I29c8da649b8b5e00b3b4dada02c8b69b2d7f0e2c BUG: 1140162 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/9511 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t')
-rw-r--r--tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t b/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
new file mode 100644
index 00000000000..f91093db4e7
--- /dev/null
+++ b/tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t
@@ -0,0 +1,33 @@
+#!/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
+TEST $CLI volume set $V0 features.encryption on
+
+cleanup;