@@ -272,13 +272,13 @@ describe('client authentication', function () {
272
272
var args = config . configureClient ( parser , ip , {
273
273
password : auth
274
274
} ) ;
275
- client = redis . createClient . apply ( redis . createClient , args ) ;
275
+ client = redis . createClient . apply ( null , args ) ;
276
276
client . set ( 'foo' , 'bar' ) ;
277
277
client . subscribe ( 'somechannel' , 'another channel' , function ( err , res ) {
278
278
client . once ( 'ready' , function ( ) {
279
279
assert . strictEqual ( client . pub_sub_mode , 1 ) ;
280
280
client . get ( 'foo' , function ( err , res ) {
281
- assert . strictEqual ( err . message , ' ERR only (P )SUBSCRIBE / (P )UNSUBSCRIBE / QUIT allowed in this context' ) ;
281
+ assert ( / E R R o n l y \( P \ )S U B S C R I B E \/ \( P \ )U N S U B S C R I B E / . test ( err . message ) ) ;
282
282
done ( ) ;
283
283
} ) ;
284
284
} ) ;
@@ -292,7 +292,7 @@ describe('client authentication', function () {
292
292
} ) ;
293
293
} ) ;
294
294
295
- it ( 'indivdual commands work properly with batch' , function ( done ) {
295
+ it ( 'individual commands work properly with batch' , function ( done ) {
296
296
// quit => might return an error instead of "OK" in the exec callback... (if not connected)
297
297
// auth => might return an error instead of "OK" in the exec callback... (if no password is required / still loading on Redis <= 2.4)
298
298
// This could be fixed by checking the return value of the callback in the exec callback and
@@ -302,7 +302,7 @@ describe('client authentication', function () {
302
302
var args = config . configureClient ( parser , 'localhost' , {
303
303
noReadyCheck : true
304
304
} ) ;
305
- client = redis . createClient . apply ( redis . createClient , args ) ;
305
+ client = redis . createClient . apply ( null , args ) ;
306
306
assert . strictEqual ( client . selected_db , undefined ) ;
307
307
var end = helper . callFuncAfter ( done , 8 ) ;
308
308
client . on ( 'monitor' , function ( ) {
@@ -317,9 +317,9 @@ describe('client authentication', function () {
317
317
} )
318
318
. monitor ( )
319
319
. set ( 'foo' , 'bar' , helper . isString ( 'OK' ) )
320
- . INFO ( function ( err , res ) {
321
- assert . strictEqual ( res . indexOf ( '# Server \r\nredis_version: ' ) , 0 ) ;
322
- assert . deepEqual ( client . serverInfo . db5 , { avg_ttl : 0 , expires : 0 , keys : 1 } ) ;
320
+ . INFO ( 'stats' , function ( err , res ) {
321
+ assert . strictEqual ( res . indexOf ( '# Stats \r\n ' ) , 0 ) ;
322
+ assert . strictEqual ( client . serverInfo . sync_full , '0' ) ;
323
323
} )
324
324
. get ( 'foo' , helper . isString ( 'bar' ) )
325
325
. subscribe ( [ 'foo' , 'bar' ] )
@@ -328,8 +328,8 @@ describe('client authentication', function () {
328
328
. psubscribe ( '*' )
329
329
. quit ( helper . isString ( 'OK' ) ) // this might be interesting
330
330
. exec ( function ( err , res ) {
331
- res [ 4 ] = res [ 4 ] . substr ( 0 , 10 ) ;
332
- assert . deepEqual ( res , [ 'OK' , 'OK' , 'OK' , 'OK' , '# Server \r\n' , 'bar' , 'bar' , 'foo' , '/foo' , '*' , 'OK' ] ) ;
331
+ res [ 4 ] = res [ 4 ] . substr ( 0 , 9 ) ;
332
+ assert . deepEqual ( res , [ 'OK' , 'OK' , 'OK' , 'OK' , '# Stats \r\n' , 'bar' , 'bar' , 'foo' , '/foo' , '*' , 'OK' ] ) ;
333
333
end ( ) ;
334
334
} ) ;
335
335
} ) ;
0 commit comments