summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl')
-rw-r--r--examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl40
1 files changed, 0 insertions, 40 deletions
diff --git a/examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl b/examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl
deleted file mode 100644
index abfea5a..0000000
--- a/examples/redis-unstable/tests/unit/moduleapi/getchannels.tcl
+++ /dev/null
@@ -1,40 +0,0 @@
-set testmodule [file normalize tests/modules/getchannels.so]
-
-start_server {tags {"modules external:skip"}} {
- r module load $testmodule
-
- # Channels are currently used to just validate ACLs, so test them here
- r ACL setuser testuser +@all resetchannels &channel &pattern*
-
- test "module getchannels-api with literals - ACL" {
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command subscribe literal channel subscribe literal pattern1]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command publish literal channel publish literal pattern1]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe literal channel unsubscribe literal pattern1]
-
- assert_equal "User testuser has no permissions to access the 'nopattern1' channel" [r ACL DRYRUN testuser getchannels.command subscribe literal channel subscribe literal nopattern1]
- assert_equal "User testuser has no permissions to access the 'nopattern1' channel" [r ACL DRYRUN testuser getchannels.command publish literal channel subscribe literal nopattern1]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe literal channel unsubscribe literal nopattern1]
-
- assert_equal "User testuser has no permissions to access the 'otherchannel' channel" [r ACL DRYRUN testuser getchannels.command subscribe literal otherchannel subscribe literal pattern1]
- assert_equal "User testuser has no permissions to access the 'otherchannel' channel" [r ACL DRYRUN testuser getchannels.command publish literal otherchannel subscribe literal pattern1]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe literal otherchannel unsubscribe literal pattern1]
- }
-
- test "module getchannels-api with patterns - ACL" {
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command subscribe pattern pattern*]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command publish pattern pattern*]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe pattern pattern*]
-
- assert_equal "User testuser has no permissions to access the 'pattern1' channel" [r ACL DRYRUN testuser getchannels.command subscribe pattern pattern1 subscribe pattern pattern*]
- assert_equal "User testuser has no permissions to access the 'pattern1' channel" [r ACL DRYRUN testuser getchannels.command publish pattern pattern1 subscribe pattern pattern*]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe pattern pattern1 unsubscribe pattern pattern*]
-
- assert_equal "User testuser has no permissions to access the 'otherpattern*' channel" [r ACL DRYRUN testuser getchannels.command subscribe pattern otherpattern* subscribe pattern pattern*]
- assert_equal "User testuser has no permissions to access the 'otherpattern*' channel" [r ACL DRYRUN testuser getchannels.command publish pattern otherpattern* subscribe pattern pattern*]
- assert_equal "OK" [r ACL DRYRUN testuser getchannels.command unsubscribe pattern otherpattern* unsubscribe pattern pattern*]
- }
-
- test "Unload the module - getchannels" {
- assert_equal {OK} [r module unload getchannels]
- }
-}