ACL LOG: test for AUTH reason.

This commit is contained in:
antirez 2020-02-04 12:58:48 +01:00
parent 0c1a4b5576
commit 64a73e9293
1 changed files with 9 additions and 0 deletions

View File

@ -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}}
}
}