"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/unit/acl.tcl" between
redis-6.0.7.tar.gz and redis-6.0.8.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

acl.tcl  (redis-6.0.7):acl.tcl  (redis-6.0.8)
skipping to change at line 264 skipping to change at line 264
catch {set rd1 [redis_deferring_client]} e catch {set rd1 [redis_deferring_client]} e
r ACL setuser default on r ACL setuser default on
set e set e
} {*NOAUTH*} } {*NOAUTH*}
test {ACL HELP should not have unexpected options} { test {ACL HELP should not have unexpected options} {
catch {r ACL help xxx} e catch {r ACL help xxx} e
assert_match "*Unknown subcommand or wrong number of arguments*" $e assert_match "*Unknown subcommand or wrong number of arguments*" $e
} }
} }
set server_path [tmpdir "server.acl"]
exec cp -f tests/assets/user.acl $server_path
start_server [list overrides [list "dir" $server_path "aclfile" "user.acl"]] {
# user alice on allcommands allkeys >alice
# user bob on -@all +@set +acl ~set* >bob
test "Alice: can excute all command" {
r AUTH alice alice
assert_equal "alice" [r acl whoami]
r SET key value
}
test "Bob: just excute @set and acl command" {
r AUTH bob bob
assert_equal "bob" [r acl whoami]
assert_equal "3" [r sadd set 1 2 3]
catch {r SET key value} e
set e
} {*NOPERM*}
test "ACL load and save" {
r ACL setuser eve +get allkeys >eve on
r ACL save
# ACL load will free user and kill clients
r ACL load
catch {r ACL LIST} e
assert_match {*I/O error*} $e
reconnect
r AUTH alice alice
r SET key value
r AUTH eve eve
r GET key
catch {r SET key value} e
set e
} {*NOPERM*}
}
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)