From 440d28091b73a87f74450942dcdd81161ca50bbe Mon Sep 17 00:00:00 2001 From: Binbin Date: Sat, 15 Jan 2022 15:13:53 +0800 Subject: [PATCH] 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 ``` --- tests/cluster/tests/00-base.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/cluster/tests/00-base.tcl b/tests/cluster/tests/00-base.tcl index 6ff043497..ff5044496 100644 --- a/tests/cluster/tests/00-base.tcl +++ b/tests/cluster/tests/00-base.tcl @@ -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 }