update
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import * as plugins from '@git.zone/tstest/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import { startTestServer, stopTestServer } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer } from '../../helpers/server.loader.js';
|
||||
|
||||
const TEST_PORT = 2525;
|
||||
|
||||
@ -73,7 +73,7 @@ tap.test('REL-05: DNS resolution failure handling - Non-existent domains', async
|
||||
const mailFromHandled = mailResponse.includes('250') ||
|
||||
mailResponse.includes('450') ||
|
||||
mailResponse.includes('550');
|
||||
expect(mailFromHandled).toBeTrue();
|
||||
expect(mailFromHandled).toEqual(true);
|
||||
|
||||
// Reset if needed
|
||||
if (mailResponse.includes('250')) {
|
||||
@ -108,7 +108,7 @@ tap.test('REL-05: DNS resolution failure handling - Non-existent domains', async
|
||||
const rcptToHandled = rcptResponse.includes('450') || // Temporary failure
|
||||
rcptResponse.includes('550') || // Permanent failure
|
||||
rcptResponse.includes('553'); // Address error
|
||||
expect(rcptToHandled).toBeTrue();
|
||||
expect(rcptToHandled).toEqual(true);
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
socket.end();
|
||||
@ -182,7 +182,7 @@ tap.test('REL-05: DNS resolution failure handling - Malformed domains', async (t
|
||||
response.includes('553'); // Address error
|
||||
|
||||
console.log(` Response: ${response.trim().substring(0, 50)}`);
|
||||
expect(properlyHandled).toBeTrue();
|
||||
expect(properlyHandled).toEqual(true);
|
||||
|
||||
// Reset if needed
|
||||
if (!response.includes('5')) {
|
||||
@ -266,7 +266,7 @@ tap.test('REL-05: DNS resolution failure handling - Special cases', async (tools
|
||||
|
||||
console.log(' IP address response:', ipResponse.trim());
|
||||
const ipHandled = ipResponse.includes('250') || ipResponse.includes('501');
|
||||
expect(ipHandled).toBeTrue();
|
||||
expect(ipHandled).toEqual(true);
|
||||
|
||||
socket.write('RSET\r\n');
|
||||
await new Promise<void>((resolve) => {
|
||||
@ -368,7 +368,7 @@ tap.test('REL-05: DNS resolution failure handling - Mixed valid/invalid recipien
|
||||
const invalidHandled = invalidRcptResponse.includes('450') ||
|
||||
invalidRcptResponse.includes('550') ||
|
||||
invalidRcptResponse.includes('553');
|
||||
expect(invalidHandled).toBeTrue();
|
||||
expect(invalidHandled).toEqual(true);
|
||||
|
||||
// Try to send data (should work if at least one valid recipient)
|
||||
socket.write('DATA\r\n');
|
||||
|
Reference in New Issue
Block a user