Skip to content

Commit

Permalink
fix redis#1917 - CLIENT UNPAUSE (redis#2128)
Browse files Browse the repository at this point in the history
* fix redis#1917 - CLIENT UNPAUSE

* fix CLIENT UNPAUSE
  • Loading branch information
leibale authored May 11, 2022
1 parent 3ec17e3 commit 24c2c86
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/client/lib/client/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as CLIENT_KILL from '../commands/CLIENT_KILL';
import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT';
import * as CLIENT_PAUSE from '../commands/CLIENT_PAUSE';
import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME';
import * as CLIENT_UNPAUSE from '../commands/CLIENT_UNPAUSE';
import * as CLIENT_INFO from '../commands/CLIENT_INFO';
import * as CLUSTER_ADDSLOTS from '../commands/CLUSTER_ADDSLOTS';
import * as CLUSTER_ADDSLOTSRANGE from '../commands/CLUSTER_ADDSLOTSRANGE';
Expand Down Expand Up @@ -164,6 +165,8 @@ export default {
clientPause: CLIENT_PAUSE,
CLIENT_SETNAME,
clientSetName: CLIENT_SETNAME,
CLIENT_UNPAUSE,
clientUnpause: CLIENT_UNPAUSE,
CLIENT_INFO,
clientInfo: CLIENT_INFO,
CLUSTER_ADDSLOTS,
Expand Down
21 changes: 21 additions & 0 deletions packages/client/lib/commands/CLIENT_UNPAUSE.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './CLIENT_UNPAUSE';

describe('CLIENT UNPAUSE', () => {
testUtils.isVersionGreaterThanHook([6, 2]);

it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['CLIENT', 'UNPAUSE']
);
});

testUtils.testWithClient('client.unpause', async client => {
assert.equal(
await client.clientUnpause(),
'OK'
);
}, GLOBAL.SERVERS.OPEN);
});
7 changes: 7 additions & 0 deletions packages/client/lib/commands/CLIENT_UNPAUSE.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { RedisCommandArguments } from '.';

export function transformArguments(): RedisCommandArguments {
return ['CLIENT', 'UNPAUSE'];
}

export declare function transformReply(): 'OK' | Buffer;

0 comments on commit 24c2c86

Please sign in to comment.