1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

CLUSERT [INFO|NODES|REPLICAS]

This commit is contained in:
Leibale
2023-09-12 16:02:12 -04:00
parent 0e8a0b9dd0
commit 17cf320651
7 changed files with 80 additions and 358 deletions

View File

@@ -1,11 +1,20 @@
import { strict as assert } from 'assert';
import { transformArguments } from './CLUSTER_REPLICAS';
import testUtils, { GLOBAL } from '../test-utils';
import CLUSTER_REPLICAS from './CLUSTER_REPLICAS';
describe('CLUSTER REPLICAS', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('0'),
['CLUSTER', 'REPLICAS', '0']
);
});
it('transformArguments', () => {
assert.deepEqual(
CLUSTER_REPLICAS.transformArguments('0'),
['CLUSTER', 'REPLICAS', '0']
);
});
testUtils.testWithCluster('clusterNode.clusterReplicas', async cluster => {
const client = await cluster.nodeClient(cluster.masters[0]);
assert.equal(
typeof await client.clusterReplicas(cluster.masters[0].id),
'string'
);
}, GLOBAL.CLUSTERS.OPEN);
});