@@ -55,7 +55,7 @@ export interface RedisServerDocker {
55
55
abstract class DockerBase {
56
56
async spawnRedisServerDocker ( { image, version } : RedisServerDockerConfig , serverArguments : Array < string > , environment ?: string ) : Promise < RedisServerDocker > {
57
57
const port = ( await portIterator . next ( ) ) . value ;
58
- let cmdLine = `docker run --init -d --network host ` ;
58
+ let cmdLine = `docker run --init -d --network host -e PORT= ${ port . toString ( ) } ` ;
59
59
if ( environment !== undefined ) {
60
60
cmdLine += `-e ${ environment } ` ;
61
61
}
@@ -250,13 +250,13 @@ export class SentinelFramework extends DockerBase {
250
250
}
251
251
252
252
protected async spawnRedisSentinelNodeDocker ( ) {
253
- const imageInfo : RedisServerDockerConfig = this . config . nodeDockerConfig ?? { image : "redis/redis-stack-server " , version : "latest " } ;
253
+ const imageInfo : RedisServerDockerConfig = this . config . nodeDockerConfig ?? { image : "redislabs/client-libs-test " , version : "8.0-M05-pre " } ;
254
254
const serverArguments : Array < string > = this . config . nodeServerArguments ?? [ ] ;
255
255
let environment ;
256
256
if ( this . config . password !== undefined ) {
257
- environment = `REDIS_ARGS="{port} --requirepass ${ this . config . password } " ` ;
257
+ environment = `REDIS_PASSWORD= ${ this . config . password } ` ;
258
258
} else {
259
- environment = 'REDIS_ARGS="{port}"' ;
259
+ environment = undefined ;
260
260
}
261
261
262
262
const docker = await this . spawnRedisServerDocker ( imageInfo , serverArguments , environment ) ;
@@ -281,9 +281,6 @@ export class SentinelFramework extends DockerBase {
281
281
for ( let i = 0 ; i < ( this . config . numberOfNodes ?? 0 ) - 1 ; i ++ ) {
282
282
promises . push (
283
283
this . spawnRedisSentinelNodeDocker ( ) . then ( async node => {
284
- if ( this . config . password !== undefined ) {
285
- await node . client . configSet ( { 'masterauth' : this . config . password } )
286
- }
287
284
await node . client . replicaOf ( '127.0.0.1' , master . docker . port ) ;
288
285
return node ;
289
286
} )
@@ -406,9 +403,6 @@ export class SentinelFramework extends DockerBase {
406
403
const masterPort = await this . getMasterPort ( ) ;
407
404
const newNode = await this . spawnRedisSentinelNodeDocker ( ) ;
408
405
409
- if ( this . config . password !== undefined ) {
410
- await newNode . client . configSet ( { 'masterauth' : this . config . password } )
411
- }
412
406
await newNode . client . replicaOf ( '127.0.0.1' , masterPort ) ;
413
407
414
408
this . #nodeList. push ( newNode ) ;
0 commit comments