summaryrefslogtreecommitdiff
path: root/tests/sentinel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sentinel')
-rw-r--r--tests/sentinel/tests/00-base.tcl18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/sentinel/tests/00-base.tcl b/tests/sentinel/tests/00-base.tcl
index 761ee82d1..1b33ca7a3 100644
--- a/tests/sentinel/tests/00-base.tcl
+++ b/tests/sentinel/tests/00-base.tcl
@@ -12,10 +12,22 @@ if {$::simulate_error} {
}
}
-test "Sentinel commands sanity check" {
+test "Sentinel command flag infrastructure works correctly" {
foreach_sentinel_id id {
- assert_equal {72} [llength [S $id command list]]
- assert_equal {15} [S $id command count]
+ set command_list [S $id command list]
+
+ foreach cmd {ping info subscribe client|setinfo} {
+ assert_not_equal [S $id command docs $cmd] {}
+ assert_not_equal [lsearch $command_list $cmd] -1
+ }
+
+ foreach cmd {save bgrewriteaof blpop replicaof} {
+ assert_equal [S $id command docs $cmd] {}
+ assert_equal [lsearch $command_list $cmd] -1
+ assert_error {ERR unknown command*} {S $id $cmd}
+ }
+
+ assert_error {ERR unknown subcommand*} {S $id client no-touch}
}
}