Tests: improve skip tags around maxmemory and resp3 (#10597)

some skip tags where missing on some tests....
This commit is contained in:
Oran Agra 2022-04-19 14:57:28 +03:00 committed by GitHub
parent 295cbf297f
commit a1c85eebf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 17 deletions

View File

@ -986,7 +986,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
test {FUNCTION - verify allow-omm allows running any command} {
r FUNCTION load replace {#!lua name=f1
@ -1003,7 +1003,7 @@ start_server {tags {"scripting"}} {
assert_match {1} [r get x]
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
}
start_server {tags {"scripting"}} {
@ -1074,7 +1074,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
test {FUNCTION - deny oom on no-writes function} {
r FUNCTION load replace {#!lua name=test
@ -1090,7 +1090,7 @@ start_server {tags {"scripting"}} {
assert_match {*can not run it when used memory > 'maxmemory'*} $e
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
test {FUNCTION - allow stale} {
r FUNCTION load replace {#!lua name=test

View File

@ -52,7 +52,7 @@ start_server {tags {"scripting"}} {
assert_match {*command not allowed when used memory*} $e
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
} ;# is_eval
test {EVAL - Does Lua interpreter replies to our requests?} {
@ -1330,7 +1330,7 @@ start_server {tags {"scripting"}} {
] 1
r config set maxmemory 0
}
} {OK} {needs:config-maxmemory}
test "no-writes shebang flag" {
assert_error {ERR Write commands are not allowed from read-only scripts*} {

View File

@ -510,7 +510,11 @@ start_server {
}
foreach resp {3 2} {
r hello $resp
if {[lsearch $::denytags "resp3"] >= 0} {
if {$resp == 3} {continue}
} else {
r hello $resp
}
# Make sure we can distinguish between an empty array and a null response
r readraw 1

View File

@ -1223,11 +1223,20 @@ start_server {tags {"zset"}} {
} {} {needs:repl}
foreach resp {3 2} {
set rd [redis_deferring_client]
if {[lsearch $::denytags "resp3"] >= 0} {
if {$resp == 3} {continue}
} else {
r hello $resp
$rd hello $resp
$rd read
}
test "ZPOPMIN/ZPOPMAX readraw in RESP$resp" {
r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e}
r hello $resp
r readraw 1
# ZPOP against non existing key.
@ -1260,9 +1269,6 @@ start_server {tags {"zset"}} {
r del zset{t}
create_zset zset2{t} {1 a 2 b 3 c 4 d 5 e}
set rd [redis_deferring_client]
$rd hello $resp
$rd read
$rd readraw 1
# BZPOP released on timeout.
@ -1291,7 +1297,7 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {a}
verify_score_response $rd $resp 1
$rd close
$rd readraw 0
}
test "ZMPOP readraw in RESP$resp" {
@ -1299,7 +1305,6 @@ start_server {tags {"zset"}} {
create_zset zset3{t} {1 a}
create_zset zset4{t} {1 a 2 b 3 c 4 d 5 e}
r hello $resp
r readraw 1
# ZMPOP against non existing key.
@ -1339,9 +1344,6 @@ start_server {tags {"zset"}} {
r del zset{t} zset2{t}
create_zset zset3{t} {1 a 2 b 3 c 4 d 5 e}
set rd [redis_deferring_client]
$rd hello $resp
$rd read
$rd readraw 1
# BZMPOP released on timeout.
@ -1380,8 +1382,9 @@ start_server {tags {"zset"}} {
assert_equal [$rd read] {b}
verify_score_response $rd $resp 2
$rd close
}
$rd close
}
test {ZINTERSTORE regression with two sets, intset+hashtable} {