Fix function no-cluster flag test (#10115)

Fixes cluster test introduced in #10066.
```
Function no-cluster flag: ERR Error registering functions: @user_function: 1: wrong number of arguments to redis.register_function
```
This commit is contained in:
Binbin 2022-01-15 15:13:53 +08:00 committed by GitHub
parent 4db4b43417
commit 440d28091b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,9 @@ test "It is possible to write and read from the cluster" {
}
test "Function no-cluster flag" {
R 1 function load lua test {redis.register_function('f1', function() return 'hello' end, {'no-cluster'})}
R 1 function load lua test {
redis.register_function{function_name='f1', callback=function() return 'hello' end, flags={'no-cluster'}}
}
catch {R 1 fcall f1 0} e
assert_match {*Can not run function on cluster, 'no-cluster' flag is set*} $e
}