Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ea1e1b12
Commit
ea1e1b12
authored
Feb 04, 2020
by
antirez
Browse files
ACL LOG: test for AUTH reason.
parent
7379c78a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/acl.tcl
View file @
ea1e1b12
...
@@ -228,4 +228,13 @@ start_server {tags {"acl"}} {
...
@@ -228,4 +228,13 @@ start_server {tags {"acl"}} {
assert
{[
llength
[
r ACL LOG
]]
> 1
}
assert
{[
llength
[
r ACL LOG
]]
> 1
}
assert
{[
llength
[
r ACL LOG 2
]]
== 2
}
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
}}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment