ACL: Test: check passwords validity and removal.
This commit is contained in:
parent
3c67c1c394
commit
6cec82b943
@ -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*}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user