fix(smartproxy): upgrade @push.rocks/smartproxy to ^23.1.0 and adapt code/tests for its async getStatistics() API
This commit is contained in:
@@ -15,7 +15,8 @@ tap.test('should use traditional port forwarding when useSocketHandler is false'
|
||||
},
|
||||
smartProxyConfig: {
|
||||
routes: []
|
||||
}
|
||||
},
|
||||
cacheConfig: { enabled: false }
|
||||
});
|
||||
|
||||
await dcRouter.start();
|
||||
@@ -51,7 +52,8 @@ tap.test('should use socket-handler mode when useSocketHandler is true', async (
|
||||
},
|
||||
smartProxyConfig: {
|
||||
routes: []
|
||||
}
|
||||
},
|
||||
cacheConfig: { enabled: false }
|
||||
});
|
||||
|
||||
await dcRouter.start();
|
||||
@@ -85,7 +87,7 @@ tap.test('should generate correct email routes for each port', async () => {
|
||||
useSocketHandler: true
|
||||
};
|
||||
|
||||
dcRouter = new DcRouter({ emailConfig });
|
||||
dcRouter = new DcRouter({ emailConfig, cacheConfig: { enabled: false } });
|
||||
|
||||
// Access the private method to generate routes
|
||||
const emailRoutes = (dcRouter as any).generateEmailRoutes(emailConfig);
|
||||
@@ -119,7 +121,8 @@ tap.test('email socket handler should handle different ports correctly', async (
|
||||
domains: ['test.local'],
|
||||
routes: [],
|
||||
useSocketHandler: true
|
||||
}
|
||||
},
|
||||
cacheConfig: { enabled: false }
|
||||
});
|
||||
|
||||
await dcRouter.start();
|
||||
@@ -145,7 +148,8 @@ tap.test('email server handleSocket method should work', async () => {
|
||||
domains: ['test.local'],
|
||||
routes: [],
|
||||
useSocketHandler: true
|
||||
}
|
||||
},
|
||||
cacheConfig: { enabled: false }
|
||||
});
|
||||
|
||||
await dcRouter.start();
|
||||
@@ -182,11 +186,12 @@ tap.test('should not create SMTP servers when useSocketHandler is true', async (
|
||||
domains: ['test.local'],
|
||||
routes: [],
|
||||
useSocketHandler: true
|
||||
}
|
||||
},
|
||||
cacheConfig: { enabled: false }
|
||||
});
|
||||
|
||||
|
||||
await dcRouter.start();
|
||||
|
||||
|
||||
// The email server should not have any SMTP server instances
|
||||
const emailServer = (dcRouter as any).emailServer;
|
||||
expect(emailServer).toBeDefined();
|
||||
@@ -209,7 +214,7 @@ tap.test('TLS handling should differ between ports', async () => {
|
||||
useSocketHandler: false // Use traditional mode to check TLS config
|
||||
};
|
||||
|
||||
dcRouter = new DcRouter({ emailConfig });
|
||||
dcRouter = new DcRouter({ emailConfig, cacheConfig: { enabled: false } });
|
||||
|
||||
const emailRoutes = (dcRouter as any).generateEmailRoutes(emailConfig);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user