diff options
Diffstat (limited to 'tests/modules/misc.c')
-rw-r--r-- | tests/modules/misc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/modules/misc.c b/tests/modules/misc.c index 64b456904..cc159a6ce 100644 --- a/tests/modules/misc.c +++ b/tests/modules/misc.c @@ -359,6 +359,14 @@ int test_rm_call(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){ return REDISMODULE_OK; } +/* wrapper for RM_Call which also replicates the module command */ +int test_rm_call_replicate(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){ + test_rm_call(ctx, argv, argc); + RedisModule_ReplicateVerbatim(ctx); + + return REDISMODULE_OK; +} + /* wrapper for RM_Call with flags */ int test_rm_call_flags(RedisModuleCtx *ctx, RedisModuleString **argv, int argc){ if(argc < 3){ @@ -497,6 +505,8 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) return REDISMODULE_ERR; if (RedisModule_CreateCommand(ctx, "test.rm_call_flags", test_rm_call_flags,"allow-stale", 0, 0, 0) == REDISMODULE_ERR) return REDISMODULE_ERR; + if (RedisModule_CreateCommand(ctx, "test.rm_call_replicate", test_rm_call_replicate,"allow-stale", 0, 0, 0) == REDISMODULE_ERR) + return REDISMODULE_ERR; return REDISMODULE_OK; } |