You've already forked node-redis
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:
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user