1- import { assertEquals } from "../../deps/std/assert.ts" ;
1+ import { assertArrayIncludes , assertEquals } from "../../deps/std/assert.ts" ;
22import { afterAll , beforeAll , describe , it } from "../../deps/std/testing.ts" ;
33import type { Connector , TestServer } from "../test_util.ts" ;
44import type { Redis } from "../../mod.ts" ;
@@ -24,7 +24,7 @@ export function aclTests(
2424 describe ( "list" , ( ) => {
2525 it ( "returns the ACL rules" , async ( ) => {
2626 assertEquals ( await client . aclList ( ) , [
27- "user default on nopass ~* &* +@all" ,
27+ "user default on nopass sanitize-payload ~* &* +@all" ,
2828 ] ) ;
2929 } ) ;
3030 } ) ;
@@ -33,15 +33,17 @@ export function aclTests(
3333 it ( "returns the user's ACL flags" , async ( ) => {
3434 assertEquals ( await client . aclGetUser ( "default" ) , [
3535 "flags" ,
36- [ "on" , "allkeys " , "allchannels" , "allcommands" , "nopass "] ,
36+ [ "on" , "nopass " , "sanitize-payload " ] ,
3737 "passwords" ,
3838 [ ] ,
3939 "commands" ,
4040 "+@all" ,
4141 "keys" ,
42- [ "*" ] ,
42+ "~*" ,
4343 "channels" ,
44- [ "*" ] ,
44+ "&*" ,
45+ "selectors" ,
46+ [ ] ,
4547 ] ) ;
4648 } ) ;
4749 } ) ;
@@ -77,23 +79,20 @@ export function aclTests(
7779 } ) ;
7880
7981 it ( "returns the commands in the specified category" , async ( ) => {
80- assertEquals (
82+ assertArrayIncludes (
8183 ( await client . aclCat ( "dangerous" ) ) . sort ( ) ,
8284 [
8385 "lastsave" ,
8486 "shutdown" ,
85- "module" ,
8687 "monitor" ,
8788 "role" ,
88- "client" ,
8989 "replconf" ,
9090 "config" ,
9191 "pfselftest" ,
9292 "save" ,
9393 "replicaof" ,
9494 "restore-asking" ,
9595 "restore" ,
96- "latency" ,
9796 "swapdb" ,
9897 "slaveof" ,
9998 "bgsave" ,
@@ -109,10 +108,7 @@ export function aclTests(
109108 "cluster" ,
110109 "info" ,
111110 "migrate" ,
112- "acl" ,
113- "sort" ,
114- "slowlog" ,
115- ] . sort ( ) ,
111+ ] ,
116112 ) ;
117113 } ) ;
118114 } ) ;
0 commit comments