1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

run tests with redis 7 as well - copied from #2020 (#2062)

* run tests on redis 7 as well - copied from #2020

* copy some changes from #2020

* clean BITCOUNT
This commit is contained in:
Leibale Eidelman
2022-03-30 08:12:21 -04:00
committed by GitHub
parent b0fb3bd63f
commit 33a3f3f6c6
7 changed files with 75 additions and 43 deletions

View File

@@ -5,24 +5,27 @@ export function transformArguments(username: RedisCommandArgument): RedisCommand
}
type AclGetUserRawReply = [
_: RedisCommandArgument,
flags: Array<RedisCommandArgument>,
_: RedisCommandArgument,
passwords: Array<RedisCommandArgument>,
_: RedisCommandArgument,
commands: RedisCommandArgument,
_: RedisCommandArgument,
keys: Array<RedisCommandArgument>,
_: RedisCommandArgument,
channels: Array<RedisCommandArgument>
'flags',
Array<RedisCommandArgument>,
'passwords',
Array<RedisCommandArgument>,
'commands',
RedisCommandArgument,
'keys',
Array<RedisCommandArgument> | RedisCommandArgument,
'channels',
Array<RedisCommandArgument> | RedisCommandArgument,
'selectors' | undefined,
Array<Array<string>> | undefined
];
interface AclUser {
flags: Array<RedisCommandArgument>;
passwords: Array<RedisCommandArgument>;
commands: RedisCommandArgument;
keys: Array<RedisCommandArgument>;
channels: Array<RedisCommandArgument>
keys: Array<RedisCommandArgument> | RedisCommandArgument;
channels: Array<RedisCommandArgument> | RedisCommandArgument;
selectors?: Array<Array<string>>;
}
export function transformReply(reply: AclGetUserRawReply): AclUser {
@@ -31,6 +34,7 @@ export function transformReply(reply: AclGetUserRawReply): AclUser {
passwords: reply[3],
commands: reply[5],
keys: reply[7],
channels: reply[9]
channels: reply[9],
selectors: reply[11]
};
}