summaryrefslogtreecommitdiffstats
path: root/tests/bugs/cli/bug-1353156-get-state-cli-validations.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/cli/bug-1353156-get-state-cli-validations.t')
-rw-r--r--tests/bugs/cli/bug-1353156-get-state-cli-validations.t52
1 files changed, 35 insertions, 17 deletions
diff --git a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t
index 6ab7a084da0..a4556c9c997 100644
--- a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t
+++ b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t
@@ -43,7 +43,6 @@ push_trapfunc rm -rf $ODIR
TEST $CLI volume create $V0 disperse $H0:$B0/b1 $H0:$B0/b2 $H0:$B0/b3
TEST $CLI volume start $V0
-TEST $CLI volume tier $V0 attach replica 2 $H0:$B1/b4 $H0:$B1/b5
TEST setup_lvm 1
TEST $CLI volume create $V1 $H0:$L1;
@@ -77,7 +76,25 @@ TEST positive_test $CLI get-state odir $ODIR file gdstate
TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate
-TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate
+TEST positive_test $CLI get-state detail
+
+TEST positive_test $CLI get-state glusterd detail
+
+TEST positive_test $CLI get-state odir $ODIR detail
+
+TEST positive_test $CLI get-state glusterd odir $ODIR detail
+
+TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate detail
+
+TEST positive_test $CLI get-state volumeoptions
+
+TEST positive_test $CLI get-state glusterd volumeoptions
+
+TEST positive_test $CLI get-state odir $ODIR volumeoptions
+
+TEST positive_test $CLI get-state glusterd odir $ODIR volumeoptions
+
+TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate volumeoptions
TEST ! $CLI get-state glusterfsd odir $ODIR;
ERRSTR=$($CLI get-state glusterfsd odir $ODIR 2>&1 >/dev/null);
@@ -111,19 +128,20 @@ TEST ! $CLI get-state glusterd foo bar;
ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null);
EXPECT 'Problem' get_parsing_arguments_part $ERRSTR;
-cleanup;
+TEST ! $CLI get-state glusterd detail file gdstate;
+ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null);
+EXPECT 'Problem' get_parsing_arguments_part $ERRSTR;
+
+TEST ! $CLI get-state glusterd foo bar detail;
+ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null);
+EXPECT 'Problem' get_parsing_arguments_part $ERRSTR;
-# I've cleaned this up as much as I can - making sure the gdstates directory
-# gets cleaned up, checking whether the CLI command actually succeeded before
-# parsing its output, etc. - but it still fails in Jenkins. Specifically, the
-# first get-state request that hits the server (i.e. doesn't bail out with a
-# parse error first) succeeds, but any others time out. They don't even get as
-# far as the glusterd log message that says we received a get-state request.
-# There doesn't seem to be a core file, so glusterd doesn't seem to have
-# crashed, but it's not responding either. Even worse, the problem seems to be
-# environment-dependent; Jenkins is the only place I've seen it, and that's
-# just about the worst environment ever for debugging anything.
-#
-# I'm marking this test bad so progress can be made elsewhere. If anybody else
-# thinks this functionality is important, and wants to make it debuggable, good
-# luck to you.
+TEST ! $CLI get-state glusterd volumeoptions file gdstate;
+ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null);
+EXPECT 'Problem' get_parsing_arguments_part $ERRSTR;
+
+TEST ! $CLI get-state glusterd foo bar volumeoptions;
+ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null);
+EXPECT 'Problem' get_parsing_arguments_part $ERRSTR;
+
+cleanup;