File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import * as CLIENT_GETNAME from '../commands/CLIENT_GETNAME';
21
21
import * as CLIENT_GETREDIR from '../commands/CLIENT_GETREDIR' ;
22
22
import * as CLIENT_ID from '../commands/CLIENT_ID' ;
23
23
import * as CLIENT_KILL from '../commands/CLIENT_KILL' ;
24
+ import * as CLIENT_NO_EVICT from '../commands/CLIENT_NO-EVICT' ;
24
25
import * as CLIENT_SETNAME from '../commands/CLIENT_SETNAME' ;
25
26
import * as CLIENT_INFO from '../commands/CLIENT_INFO' ;
26
27
import * as CLUSTER_ADDSLOTS from '../commands/CLUSTER_ADDSLOTS' ;
@@ -158,6 +159,8 @@ export default {
158
159
clientKill : CLIENT_KILL ,
159
160
CLIENT_SETNAME ,
160
161
clientSetName : CLIENT_SETNAME ,
162
+ 'CLIENT_NO-EVICT' : CLIENT_NO_EVICT ,
163
+ clientNoEvict : CLIENT_NO_EVICT ,
161
164
CLIENT_INFO ,
162
165
clientInfo : CLIENT_INFO ,
163
166
CLUSTER_ADDSLOTS ,
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './CLIENT_NO-EVICT' ;
4
+
5
+ describe ( 'CLIENT NO-EVICT' , ( ) => {
6
+ testUtils . isVersionGreaterThanHook ( [ 7 ] ) ;
7
+
8
+ describe ( 'transformArguments' , ( ) => {
9
+ it ( 'true' , ( ) => {
10
+ assert . deepEqual (
11
+ transformArguments ( true ) ,
12
+ [ 'CLIENT' , 'NO-EVICT' , 'ON' ]
13
+ ) ;
14
+ } ) ;
15
+
16
+ it ( 'false' , ( ) => {
17
+ assert . deepEqual (
18
+ transformArguments ( false ) ,
19
+ [ 'CLIENT' , 'NO-EVICT' , 'OFF' ]
20
+ ) ;
21
+ } ) ;
22
+ } ) ;
23
+
24
+ testUtils . testWithClient ( 'client.clientNoEvict' , async client => {
25
+ assert . equal (
26
+ await client . clientNoEvict ( true ) ,
27
+ 'OK'
28
+ ) ;
29
+ } , GLOBAL . SERVERS . OPEN ) ;
30
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArguments } from '.' ;
2
+
3
+ export function transformArguments ( value : boolean ) : RedisCommandArguments {
4
+ return [
5
+ 'CLIENT' ,
6
+ 'NO-EVICT' ,
7
+ value ? 'ON' : 'OFF'
8
+ ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : 'OK' | Buffer ;
You can’t perform that action at this time.
0 commit comments