summaryrefslogtreecommitdiffstats
path: root/tests/bugs/cli/bug-1378842-volume-get-all.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/cli/bug-1378842-volume-get-all.t')
-rw-r--r--tests/bugs/cli/bug-1378842-volume-get-all.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/cli/bug-1378842-volume-get-all.t b/tests/bugs/cli/bug-1378842-volume-get-all.t
new file mode 100644
index 00000000000..c798ce5ceff
--- /dev/null
+++ b/tests/bugs/cli/bug-1378842-volume-get-all.t
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup;
+TEST glusterd
+TEST pidof glusterd
+
+TEST $CLI volume set all server-quorum-ratio 80
+
+# Execute volume get without having an explicit option, this should fail
+TEST ! $CLI volume get all
+
+# Also volume get on an option not applicable for all volumes should fail
+TEST ! $CLI volume get all cluster.tier-mode
+
+# Execute volume get with an explicit global option
+TEST $CLI volume get all server-quorum-ratio
+EXPECT '80' volume_get_field all 'cluster.server-quorum-ratio'
+
+# Execute volume get with 'all'
+TEST $CLI volume get all all
+
+cleanup;
+