update
This commit is contained in:
@ -2,7 +2,7 @@ import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as net from 'net';
|
||||
import * as tls from 'tls';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer, TEST_PORT, sendEmailWithRawSocket } from '../../helpers/server.loader.js';
|
||||
import type { SmtpServer } from '../../../ts/mail/delivery/smtpserver/index.js';
|
||||
|
||||
let testServer: SmtpServer;
|
||||
@ -36,7 +36,7 @@ tap.test('RFC 8314 TLS - STARTTLS advertised in EHLO', async (tools) => {
|
||||
const advertisesStarttls = dataBuffer.toLowerCase().includes('starttls');
|
||||
|
||||
console.log('STARTTLS advertised:', advertisesStarttls);
|
||||
expect(advertisesStarttls).toBeTrue();
|
||||
expect(advertisesStarttls).toEqual(true);
|
||||
|
||||
// Parse other extensions
|
||||
const lines = dataBuffer.split('\r\n');
|
||||
@ -98,7 +98,7 @@ tap.test('RFC 8314 TLS - STARTTLS command functionality', async (tools) => {
|
||||
|
||||
// In a real test, we would upgrade to TLS here
|
||||
// For this test, we just verify the command is accepted
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
|
||||
socket.end();
|
||||
done.resolve();
|
||||
@ -144,7 +144,7 @@ tap.test('RFC 8314 TLS - Commands before STARTTLS', async (tools) => {
|
||||
console.log('Server allows MAIL FROM before STARTTLS');
|
||||
} else if (dataBuffer.includes('530') || dataBuffer.includes('554')) {
|
||||
console.log('Server requires STARTTLS before MAIL FROM (RFC 8314 compliant)');
|
||||
expect(true).toBeTrue(); // This is actually good for security
|
||||
expect(true).toEqual(true); // This is actually good for security
|
||||
}
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
|
Reference in New Issue
Block a user