update
This commit is contained in:
@ -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, {
|
||||
|
Reference in New Issue
Block a user