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
6cec82b9
Commit
6cec82b9
authored
Jan 28, 2019
by
antirez
Browse files
ACL: Test: check passwords validity and removal.
parent
3c67c1c3
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/unit/acl.tcl
View file @
6cec82b9
...
...
@@ -14,7 +14,24 @@ start_server {tags {"acl"}} {
}
{
*WRONGPASS*
}
test
{
Enabling the user allows the login
}
{
r ACL setuser newuser on
r ACL setuser newuser on
+acl
r AUTH newuser passwd1
}
{
OK
}
r ACL WHOAMI
}
{
newuser
}
test
{
Only the set of correct passwords work
}
{
r ACL setuser newuser >passwd2
catch
{
r AUTH newuser passwd1
}
e
assert
{
$e
eq
"OK"
}
catch
{
r AUTH newuser passwd2
}
e
assert
{
$e
eq
"OK"
}
catch
{
r AUTH newuser passwd3
}
e
set e
}
{
*WRONGPASS*
}
test
{
It is possible to remove passwords from the set of valid ones
}
{
r ACL setuser newuser <passwd1
catch
{
r AUTH newuser passwd1
}
e
set e
}
{
*WRONGPASS*
}
}
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