@@ -55,7 +55,7 @@ export interface RedisServerDocker {
5555abstract class DockerBase {
5656 async spawnRedisServerDocker ( { image, version } : RedisServerDockerConfig , serverArguments : Array < string > , environment ?: string ) : Promise < RedisServerDocker > {
5757 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 ( ) } ` ;
5959 if ( environment !== undefined ) {
6060 cmdLine += `-e ${ environment } ` ;
6161 }
@@ -250,13 +250,13 @@ export class SentinelFramework extends DockerBase {
250250 }
251251
252252 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 " } ;
254254 const serverArguments : Array < string > = this . config . nodeServerArguments ?? [ ] ;
255255 let environment ;
256256 if ( this . config . password !== undefined ) {
257- environment = `REDIS_ARGS="{port} --requirepass ${ this . config . password } " ` ;
257+ environment = `REDIS_PASSWORD= ${ this . config . password } ` ;
258258 } else {
259- environment = 'REDIS_ARGS="{port}"' ;
259+ environment = undefined ;
260260 }
261261
262262 const docker = await this . spawnRedisServerDocker ( imageInfo , serverArguments , environment ) ;
@@ -281,9 +281,6 @@ export class SentinelFramework extends DockerBase {
281281 for ( let i = 0 ; i < ( this . config . numberOfNodes ?? 0 ) - 1 ; i ++ ) {
282282 promises . push (
283283 this . spawnRedisSentinelNodeDocker ( ) . then ( async node => {
284- if ( this . config . password !== undefined ) {
285- await node . client . configSet ( { 'masterauth' : this . config . password } )
286- }
287284 await node . client . replicaOf ( '127.0.0.1' , master . docker . port ) ;
288285 return node ;
289286 } )
@@ -406,9 +403,6 @@ export class SentinelFramework extends DockerBase {
406403 const masterPort = await this . getMasterPort ( ) ;
407404 const newNode = await this . spawnRedisSentinelNodeDocker ( ) ;
408405
409- if ( this . config . password !== undefined ) {
410- await newNode . client . configSet ( { 'masterauth' : this . config . password } )
411- }
412406 await newNode . client . replicaOf ( '127.0.0.1' , masterPort ) ;
413407
414408 this . #nodeList. push ( newNode ) ;
0 commit comments