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: Valentino Geron <valentino@redis.com>
This commit is contained in:
Valentino Geron 2022-08-03 12:11:32 +03:00 committed by GitHub
parent 7cd3520424
commit dcafee55a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,7 +383,8 @@ start_server {tags {"acl external:skip"}} {
} {}
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 XINFO STREAM key
}
@ -395,10 +396,11 @@ start_server {tags {"acl external:skip"}} {
r SELECT 0
catch {r SELECT 1} e
set e
} {*NOPERM*select*}
} {*NOPERM*select*} {singledb:skip}
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]
assert_match {*+debug|object*} $cmdstr
r INCR key