Unverified Commit dcafee55 authored by Valentino Geron's avatar Valentino Geron Committed by GitHub
Browse files

Fix acl tests to support `--singledb` flag (#11077)



* some of the tests don't clean the key the use
* marked tests with `{singledb:skip}` if they use SELECT
Co-authored-by: default avatarValentino Geron <valentino@redis.com>
parent 7cd35204
...@@ -383,7 +383,8 @@ start_server {tags {"acl external:skip"}} { ...@@ -383,7 +383,8 @@ start_server {tags {"acl external:skip"}} {
} {} } {}
test {ACLs including of a type includes also subcommands} { test {ACLs including of a type includes also subcommands} {
r ACL setuser newuser -@all +acl +@stream r ACL setuser newuser -@all +del +acl +@stream
r DEL key
r XADD key * field value r XADD key * field value
r XINFO STREAM key r XINFO STREAM key
} }
...@@ -395,10 +396,11 @@ start_server {tags {"acl external:skip"}} { ...@@ -395,10 +396,11 @@ start_server {tags {"acl external:skip"}} {
r SELECT 0 r SELECT 0
catch {r SELECT 1} e catch {r SELECT 1} e
set e set e
} {*NOPERM*select*} } {*NOPERM*select*} {singledb:skip}
test {ACLs can block all DEBUG subcommands except one} { test {ACLs can block all DEBUG subcommands except one} {
r ACL setuser newuser -@all +acl +incr +debug|object r ACL setuser newuser -@all +acl +del +incr +debug|object
r DEL key
set cmdstr [dict get [r ACL getuser newuser] commands] set cmdstr [dict get [r ACL getuser newuser] commands]
assert_match {*+debug|object*} $cmdstr assert_match {*+debug|object*} $cmdstr
r INCR key r INCR key
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment