You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
wip
This commit is contained in:
@@ -24,7 +24,7 @@ describe('ACL LOG', () => {
|
|||||||
testUtils.testWithClient('client.aclLog', async client => {
|
testUtils.testWithClient('client.aclLog', async client => {
|
||||||
// make sure to create at least one log
|
// make sure to create at least one log
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
client.aclSetUser('test', 'on >test'),
|
client.aclSetUser('test', 'on +@all'),
|
||||||
client.auth({
|
client.auth({
|
||||||
username: 'test',
|
username: 'test',
|
||||||
password: 'test'
|
password: 'test'
|
||||||
|
@@ -1,23 +1,23 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils from '../test-utils';
|
import testUtils from '../test-utils';
|
||||||
import { transformArguments } from './ACL_SETUSER';
|
import ACL_SETUSER from './ACL_SETUSER';
|
||||||
|
|
||||||
describe('ACL SETUSER', () => {
|
describe('ACL SETUSER', () => {
|
||||||
testUtils.isVersionGreaterThanHook([6]);
|
testUtils.isVersionGreaterThanHook([6]);
|
||||||
|
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('string', () => {
|
it('string', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('username', 'allkeys'),
|
ACL_SETUSER.transformArguments('username', 'allkeys'),
|
||||||
['ACL', 'SETUSER', 'username', 'allkeys']
|
['ACL', 'SETUSER', 'username', 'allkeys']
|
||||||
);
|
);
|
||||||
});
|
|
||||||
|
|
||||||
it('array', () => {
|
|
||||||
assert.deepEqual(
|
|
||||||
transformArguments('username', ['allkeys', 'allchannels']),
|
|
||||||
['ACL', 'SETUSER', 'username', 'allkeys', 'allchannels']
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('array', () => {
|
||||||
|
assert.deepEqual(
|
||||||
|
ACL_SETUSER.transformArguments('username', ['allkeys', 'allchannels']),
|
||||||
|
['ACL', 'SETUSER', 'username', 'allkeys', 'allchannels']
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils from '../test-utils';
|
import testUtils from '../test-utils';
|
||||||
import { transformArguments } from './ACL_USERS';
|
import ACL_USERS from './ACL_USERS';
|
||||||
|
|
||||||
describe('ACL USERS', () => {
|
describe('ACL USERS', () => {
|
||||||
testUtils.isVersionGreaterThanHook([6]);
|
testUtils.isVersionGreaterThanHook([6]);
|
||||||
|
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments(),
|
ACL_USERS.transformArguments(),
|
||||||
['ACL', 'USERS']
|
['ACL', 'USERS']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils from '../test-utils';
|
import testUtils from '../test-utils';
|
||||||
import { transformArguments } from './ACL_WHOAMI';
|
import ACL_WHOAMI from './ACL_WHOAMI';
|
||||||
|
|
||||||
describe('ACL WHOAMI', () => {
|
describe('ACL WHOAMI', () => {
|
||||||
testUtils.isVersionGreaterThanHook([6]);
|
testUtils.isVersionGreaterThanHook([6]);
|
||||||
|
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments(),
|
ACL_WHOAMI.transformArguments(),
|
||||||
['ACL', 'WHOAMI']
|
['ACL', 'WHOAMI']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user