This commit is contained in:
2025-05-08 12:46:10 +00:00
parent 7aaf8f2595
commit 8b857e3d1d
26 changed files with 5215 additions and 142 deletions

View File

@ -25,8 +25,22 @@ tap.test('should be able to create an independent MTA service', async (tools) =>
});
tap.test('should be able to create an EmailService with an existing MTA', async (tools) => {
// Create a platform service first
const platformService = new SzPlatformService();
// Create a platform service with test config
const platformService = new SzPlatformService({
id: 'test-platform-service',
version: '1.0.0',
environment: 'test',
name: 'TestPlatformService',
enabled: true,
logging: {
level: 'info',
structured: true,
correlationTracking: true
},
server: {
enabled: false // Disable server for tests
}
});
// Create a shared bounce manager
const bounceManager = new BounceManager();
@ -74,8 +88,22 @@ tap.test('MTA service should have SMTP rule engine', async (tools) => {
});
tap.test('platform service should support having an MTA service', async (tools) => {
// Create a platform service with default config
const platformService = new SzPlatformService();
// Create a platform service with test config
const platformService = new SzPlatformService({
id: 'test-platform-service',
version: '1.0.0',
environment: 'test',
name: 'TestPlatformService',
enabled: true,
logging: {
level: 'info',
structured: true,
correlationTracking: true
},
server: {
enabled: false // Disable server for tests
}
});
// Create MTA - don't await start() to avoid binding to ports
platformService.mtaService = new MtaService(platformService, {