diff options
Diffstat (limited to 'tests/modules/keyspecs.c')
-rw-r--r-- | tests/modules/keyspecs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/modules/keyspecs.c b/tests/modules/keyspecs.c index d2ae9fd6c..0a70de814 100644 --- a/tests/modules/keyspecs.c +++ b/tests/modules/keyspecs.c @@ -7,6 +7,15 @@ int kspec_impl(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { UNUSED(argv); UNUSED(argc); + + /* Handle getkeys-api introspection (for "kspec.nonewithgetkeys") */ + if (RedisModule_IsKeysPositionRequest(ctx)) { + for (int i = 1; i < argc; i += 2) + RedisModule_KeyAtPosWithFlags(ctx, i, REDISMODULE_CMD_KEY_RO | REDISMODULE_CMD_KEY_ACCESS); + + return REDISMODULE_OK; + } + RedisModule_ReplyWithSimpleString(ctx, "OK"); return REDISMODULE_OK; } |