From aa2ba3680358ddb56e5c54c0661f4367b5b19d83 Mon Sep 17 00:00:00 2001 From: hwware Date: Fri, 22 Nov 2024 19:49:00 +0000 Subject: [PATCH] update some codes related to test case Signed-off-by: hwware --- tests/modules/moduleparameter.c | 3 +-- tests/unit/moduleapi/moduleconfigs.tcl | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/modules/moduleparameter.c b/tests/modules/moduleparameter.c index 1f681f93a6..82b9d86c9b 100644 --- a/tests/modules/moduleparameter.c +++ b/tests/modules/moduleparameter.c @@ -6,8 +6,7 @@ int test_module_update_parameter(ValkeyModuleCtx *ctx, ValkeyModuleString **argv, int argc) { - ValkeyModule_UpdateRuntimeArgs(ctx, argv, argc); - return ValkeyModule_ReplyWithSimpleString(ctx, "Module runtime args test"); + return ValkeyModule_UpdateRuntimeArgs(ctx, argv, argc); } int ValkeyModule_OnLoad(ValkeyModuleCtx *ctx, ValkeyModuleString **argv, int argc) { diff --git a/tests/unit/moduleapi/moduleconfigs.tcl b/tests/unit/moduleapi/moduleconfigs.tcl index fbc2dc78ca..3cb08ebc8e 100644 --- a/tests/unit/moduleapi/moduleconfigs.tcl +++ b/tests/unit/moduleapi/moduleconfigs.tcl @@ -251,8 +251,8 @@ start_server {tags {"modules"}} { set t [r module list] set modulename [lmap x [r module list] {dict get $x name}] assert_not_equal [lsearch $modulename moduleparameter] -1 - string match "10 20 30" [lmap x [r module list] {dict get $x args}] + assert_equal "{10 20 30}" [lmap x [r module list] {dict get $x args}] r testmoduleparameter.update.parameter 40 50 60 70 - string match "40 50 60 70" [lmap x [r module list] {dict get $x args}] + assert_equal "{40 50 60 70}" [lmap x [r module list] {dict get $x args}] } }