fix(smartproxy): Improve port binding intelligence and ACME challenge route management; update route configuration tests and dependency versions.

This commit is contained in:
2025-05-28 19:58:28 +00:00
parent 4ebaf6c061
commit 742adc2bd9
17 changed files with 948 additions and 1258 deletions

View File

@ -37,6 +37,18 @@ tap.test('should defer certificate provisioning until ports are ready', async (t
console.log('Creating mock cert manager');
operationOrder.push('create-cert-manager');
const mockCertManager = {
certStore: null,
smartAcme: null,
httpProxy: null,
renewalTimer: null,
pendingChallenges: new Map(),
challengeRoute: null,
certStatus: new Map(),
globalAcmeDefaults: null,
updateRoutesCallback: undefined,
challengeRouteActive: false,
isProvisioning: false,
acmeStateManager: null,
initialize: async () => {
operationOrder.push('cert-manager-init');
console.log('Mock cert manager initialized');
@ -56,8 +68,15 @@ tap.test('should defer certificate provisioning until ports are ready', async (t
setAcmeStateManager: () => {},
setUpdateRoutesCallback: () => {},
getAcmeOptions: () => ({}),
getState: () => ({ challengeRouteActive: false })
};
getState: () => ({ challengeRouteActive: false }),
getCertStatus: () => new Map(),
checkAndRenewCertificates: async () => {},
addChallengeRoute: async () => {},
removeChallengeRoute: async () => {},
getCertificate: async () => null,
isValidCertificate: () => false,
waitForProvisioning: async () => {}
} as any;
// Call initialize immediately as the real createCertificateManager does
await mockCertManager.initialize();