1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
Files
node-redis/packages/client/lib/commands/CLUSTER_LINKS.spec.ts
Leibale Eidelman b586ccb9d7 fix #1904 - ACL DRYRUN (#2102)
* fix #1904 - ACL DRYRUN

* clean code

* fix test
2022-04-26 09:04:21 -04:00

28 lines
1015 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './CLUSTER_LINKS';
describe('CLUSTER LINKS', () => {
testUtils.isVersionGreaterThanHook([7]);
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['CLUSTER', 'LINKS']
);
});
testUtils.testWithCluster('clusterNode.clusterLinks', async cluster => {
const links = await cluster.getSlotMaster(0).client.clusterLinks();
assert.ok(Array.isArray(links));
for (const link of links) {
assert.equal(typeof link.direction, 'string');
assert.equal(typeof link.node, 'string');
assert.equal(typeof link.createTime, 'number');
assert.equal(typeof link.events, 'string');
assert.equal(typeof link.sendBufferAllocated, 'number');
assert.equal(typeof link.sendBufferUsed, 'number');
}
}, GLOBAL.CLUSTERS.OPEN);
});