redict/tests/unit
Roshan Khatri 7519960527
Allows modules to declare new ACL categories. (#12486)
This PR adds a new Module API int RM_AddACLCategory(RedisModuleCtx *ctx, const char *category_name) to add a new ACL command category.

Here, we initialize the ACLCommandCategories array by allocating space for 64 categories and duplicate the 21 default categories from the predefined array 'ACLDefaultCommandCategories' into the ACLCommandCategories array while ACL initialization. Valid ACL category names can only contain alphanumeric characters, underscores, and dashes.

The API when called, checks for the onload flag, category name validity, and for duplicate category name if present. If the conditions are satisfied, the API adds the new category to the trailing end of the ACLCommandCategories array and assigns the acl_categories flag bit according to the index at which the category is added.

If any error is encountered the errno is set accordingly by the API.

---------

Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2023-08-30 13:01:24 -07:00
..
cluster redis-cli: use previous hostip when not provided by redis cluster server (#12273) 2023-07-20 15:31:06 -07:00
moduleapi Allows modules to declare new ACL categories. (#12486) 2023-08-30 13:01:24 -07:00
type Test coverage for incr/decr operation on robj encoding type optimization (#12435) 2023-07-25 16:43:31 -07:00
acl-v2.tcl fix false success and a memory leak for ACL selector with bad parenthesis combination (#12452) 2023-08-02 10:46:06 +03:00
acl.tcl Fixed a bug where sequential matching ACL rules weren't compressed (#12472) 2023-08-10 09:58:53 +03:00
aofrw.tcl Attempt to solve MacOS CI issues in GH Actions (#12013) 2023-04-12 09:19:21 +03:00
auth.tcl Fix race condition in tests/unit/auth.tcl (#12444) 2023-08-01 18:03:33 +03:00
bitfield.tcl Add BITFIELD_RO basic tests for non-repl use cases (#12187) 2023-05-18 12:16:46 +03:00
bitops.tcl BITCOUNT and BITPOS with non-existing key and illegal arguments should return error, not 0 (#11734) 2023-08-21 19:48:30 +03:00
client-eviction.tcl Attempt to solve MacOS CI issues in GH Actions (#12013) 2023-04-12 09:19:21 +03:00
dump.tcl Fix SPOP/RESTORE propagation when doing lazy free (#12320) 2023-06-16 08:14:11 -07:00
expire.tcl Optimize SET PXAT to reduce calls of rewriteClientCommandVector (#12316) 2023-06-15 10:07:47 +03:00
functions.tcl Tests: Add missing key declaration in scripts (#11134) 2022-08-16 22:04:22 +03:00
geo.tcl adding geo command edge cases tests (#12274) 2023-06-20 12:50:03 +03:00
hyperloglog.tcl Hyperloglog avoid allocate more than 'server.hll_sparse_max_bytes' bytes of memory for sparse representation (#11438) 2022-11-28 17:35:31 +02:00
info-command.tcl Make INFO command variadic (#6891) 2022-02-08 13:14:42 +02:00
info.tcl Add two stats to count client input and output buffer oom. (#12476) 2023-08-30 21:51:14 +03:00
introspection-2.tcl Fix possible crash in command getkeys (#12380) 2023-07-03 12:45:18 +03:00
introspection.tcl Added tests for Client commands (#10276) 2023-08-20 19:17:51 +03:00
keyspace.tcl String pattern matching had exponential time complexity on pathological patterns (CVE-2022-36021) (#11858) 2023-02-28 15:15:26 +02:00
latency-monitor.tcl Add printing for LATENCY related tests (#12514) 2023-08-27 11:42:55 +03:00
lazyfree.tcl attempt to fix tracking test issue with external tests due to lazy free (#9722) 2021-11-02 16:42:53 +02:00
limits.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
maxmemory.tcl postpone the initialization of oject's lru&lfu until it is added to the db as a value object (#11626) 2023-05-24 09:40:11 +03:00
memefficiency.tcl Increase the threshold of the AOF loading defrag test (#11871) 2023-03-04 12:54:36 +02:00
multi.tcl multi.tcl: reset readraw at the end of the test (#12123) 2023-05-04 11:58:31 +03:00
networking.tcl Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
obuf-limits.tcl Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
oom-score-adj.tcl Return 0 when config set out-of-range oom-score-adj-values (#10601) 2022-04-19 11:31:15 +03:00
other.tcl Support TLS service when "tls-cluster" is not enabled and persist both plain and TLS port in nodes.conf (#12233) 2023-06-26 07:43:38 -07:00
pause.tcl Bump codespell to 2.2.4, fix typos and outupdated comments (#11911) 2023-03-16 08:50:32 +02:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
pubsub.tcl Fix broken protocol when PUBLISH emits local push inside MULTI (#12326) 2023-06-20 20:41:41 +03:00
pubsubshard.tcl Fix the bug that CLIENT REPLY OFF|SKIP cannot receive push notifications (#11875) 2023-03-12 17:50:44 +02:00
querybuf.tcl Pause cron to prevent premature shrinking in querybuf test (#12126) 2023-05-04 13:02:08 +03:00
quit.tcl flushSlavesOutputBuffers should not write to replicas scheduled to drop (#12242) 2023-06-12 14:05:34 +03:00
replybufsize.tcl Introduce debug command to disable reply buffer resizing (#10360) 2022-03-01 14:40:29 +02:00
scan.tcl improve performance for scan command when matching pattern or data type (#12209) 2023-06-27 16:43:46 +03:00
scripting.tcl do not call handleClientsBlockedOnKeys inside yielding command (#12459) 2023-08-05 09:52:03 +03:00
shutdown.tcl Tests: Do not save an RDB by default and add a SIGTERM default AOFRW test (#12064) 2023-04-18 16:14:26 +03:00
slowlog.tcl minor optimization for slowlog get (#12103) 2023-04-25 10:17:21 +03:00
sort.tcl Fix sort_ro get-keys function return wrong key number (#12522) 2023-08-30 22:00:02 +03:00
tls.tcl Add support for reading encrypted keyfiles. (#8644) 2021-03-22 13:27:46 +02:00
tracking.tcl Fix the bug that CLIENT REPLY OFF|SKIP cannot receive push notifications (#11875) 2023-03-12 17:50:44 +02:00
violations.tcl Run large-memory tests as solo. (#10626) 2022-04-24 17:29:35 +03:00
wait.tcl Attempt to solve MacOS CI issues in GH Actions (#12013) 2023-04-12 09:19:21 +03:00