fix(tests): fix tests

This commit is contained in:
Juergen Kunz
2025-06-22 23:10:56 +00:00
parent 131a454b28
commit e5ec48abd3
6 changed files with 298 additions and 90 deletions

View File

@ -105,6 +105,13 @@ export interface ISmartProxyOptions {
useHttpProxy?: number[]; // Array of ports to forward to HttpProxy
httpProxyPort?: number; // Port where HttpProxy is listening (default: 8443)
// Metrics configuration
metrics?: {
enabled?: boolean;
sampleIntervalMs?: number;
retentionSeconds?: number;
};
/**
* Global ACME configuration options for SmartProxy
*

View File

@ -201,7 +201,10 @@ export class SmartProxy extends plugins.EventEmitter {
this.acmeStateManager = new AcmeStateManager();
// Initialize metrics collector with reference to this SmartProxy instance
this.metricsCollector = new MetricsCollector(this);
this.metricsCollector = new MetricsCollector(this, {
sampleIntervalMs: this.settings.metrics?.sampleIntervalMs,
retentionSeconds: this.settings.metrics?.retentionSeconds
});
}
/**