summaryrefslogtreecommitdiffstats
path: root/tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-01-13 11:40:03 +0530
committerNiels de Vos <ndevos@redhat.com>2015-01-13 06:17:53 -0800
commite9c90da38e1b6fb7fc4e0d5d1e987c510d1c17d6 (patch)
tree598a6e731313b28b1cf2b4ced45276b0673ecb22 /tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t
parent015282013a22dda84d1849e18659d42bb5bb48f4 (diff)
tests: move all snapshot test cases from glusterd to snapshot component
Change-Id: Id04037a38e80fe9b400678cfe6bc731cdefae834 BUG: 1178685 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9437 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t')
-rw-r--r--tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t b/tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-validation.t
new file mode 100644
index 00000000000..f91093db4e7
--- /dev/null
+++ b/tests/bugs/snapshot/bug-1140162-file-snapshot-and-features-encryption-option-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;