Skip to content

Commit ae0e969

Browse files
committed
Replcae sentinel commands sanity check with infrastructure work test
The sanity check test intention was to detect that when a command is added to sentinel it is on purpose. This test is easily broken, like CLIENT SETINFO introduced by redis#11758. We replace it with a test that validates that a few specific commands are either there or missing (to test the infrastructure works correctly).
1 parent ef50118 commit ae0e969

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/sentinel/tests/00-base.tcl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@ if {$::simulate_error} {
1212
}
1313
}
1414

15-
test "Sentinel commands sanity check" {
15+
test "Sentinel command flag infrastructure works correctly" {
1616
foreach_sentinel_id id {
17-
assert_equal {72} [llength [S $id command list]]
18-
assert_equal {15} [S $id command count]
17+
set command_list [S $id command list]
18+
19+
foreach cmd {ping info subscribe client|setinfo} {
20+
assert_not_equal [S $id command docs $cmd] {}
21+
assert_not_equal [lsearch $command_list $cmd] -1
22+
}
23+
24+
foreach cmd {save bgrewriteaof blpop replicaof client|no-touch} {
25+
assert_equal [S $id command docs $cmd] {}
26+
assert_equal [lsearch $command_list $cmd] -1
27+
}
1928
}
2029
}
2130

0 commit comments

Comments
 (0)