@@ -38,16 +38,6 @@ const clusterNodes = [
3838 } ,
3939] ;
4040
41- // NAT mapping for ioredis Cluster (Docker container returns internal IP)
42- const ioredisNatMap = {
43- "172.20.0.3:7000" : { host : "localhost" , port : 7000 } ,
44- "172.20.0.3:7001" : { host : "localhost" , port : 7001 } ,
45- "172.20.0.3:7002" : { host : "localhost" , port : 7002 } ,
46- "172.20.0.3:7003" : { host : "localhost" , port : 7003 } ,
47- "172.20.0.3:7004" : { host : "localhost" , port : 7004 } ,
48- "172.20.0.3:7005" : { host : "localhost" , port : 7005 } ,
49- } ;
50-
5141function testSuite (
5242 createAdapter : any ,
5343 redisPackage : string = "redis@4" ,
@@ -149,9 +139,7 @@ describe("@socket.io/redis-adapter", () => {
149139
150140 describe ( "ioredis cluster" , ( ) =>
151141 testSuite ( async ( ) => {
152- const pubClient = new Cluster ( clusterNodes , {
153- natMap : ioredisNatMap ,
154- } ) ;
142+ const pubClient = new Cluster ( clusterNodes ) ;
155143 const subClient = pubClient . duplicate ( ) ;
156144
157145 return [
@@ -271,13 +259,11 @@ describe("@socket.io/redis-adapter", () => {
271259 true
272260 ) ) ;
273261
274- // Fixed in ioredis 5.9.0, see https://github.com/redis/ioredis/pull/1956
275262 describe ( "[sharded] ioredis cluster" , ( ) =>
276263 testSuite (
277264 async ( ) => {
278265 const pubClient = new Cluster ( clusterNodes , {
279266 shardedSubscribers : true ,
280- natMap : ioredisNatMap ,
281267 } ) ;
282268 const subClient = pubClient . duplicate ( ) ;
283269
0 commit comments