summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-02-04 12:58:48 +0100
committerantirez <antirez@gmail.com>2020-02-04 12:58:48 +0100
commit64a73e9293154482977cd530a2adc05f1fcc92f6 (patch)
treee0c0b856c628a8d15f996a55aba931d0867cbb3e
parent0c1a4b557691df2196d41835aeef5c1f29914b82 (diff)
downloadredis-64a73e9293154482977cd530a2adc05f1fcc92f6.tar.gz
ACL LOG: test for AUTH reason.
-rw-r--r--tests/unit/acl.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/acl.tcl b/tests/unit/acl.tcl
index bd909d36c..0e6d5c66a 100644
--- a/tests/unit/acl.tcl
+++ b/tests/unit/acl.tcl
@@ -228,4 +228,13 @@ start_server {tags {"acl"}} {
assert {[llength [r ACL LOG]] > 1}
assert {[llength [r ACL LOG 2]] == 2}
}
+
+ test {ACL LOG can log failed auth attempts} {
+ catch {r AUTH antirez wrong-password}
+ set entry [lindex [r ACL LOG] 0]
+ assert {[dict get $entry context] eq {toplevel}}
+ assert {[dict get $entry reason] eq {auth}}
+ assert {[dict get $entry object] eq {AUTH}}
+ assert {[dict get $entry username] eq {antirez}}
+ }
}