mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-28 20:56:03 +00:00
test: Unify (most) SMTP client calls
To send mails, today some tests use msmtp and others our internal smtpc.py. This works, but msmtp slows down the tests significantly, and smtpc.py is also not particularly fast, and also has some limitations. This patch introduces a new SMTP client tool written in Go, and makes almost all the tests use it. Some tests still remain on msmtp, mainly for client-check compatibility. It's likely that this will be moved in later patches to a separate special-purpose test. With this patch, integration tests take ~20% less time than before.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
account default
|
||||
|
||||
host testserver
|
||||
port 1587
|
||||
|
||||
tls on
|
||||
tls_trust_file config/certs/testserver/fullchain.pem
|
||||
|
||||
from user@testserver
|
||||
|
||||
auth on
|
||||
user user@testserver
|
||||
password secretpassword
|
||||
|
||||
account smtpport : default
|
||||
port 1025
|
||||
|
||||
account subm_tls : default
|
||||
port 1465
|
||||
tls_starttls off
|
||||
|
||||
account baduser : default
|
||||
user unknownuser@testserver
|
||||
password secretpassword
|
||||
|
||||
account badpasswd : default
|
||||
user user@testserver
|
||||
password badsecretpassword
|
||||
@@ -20,7 +20,7 @@ function send_one() {
|
||||
> .logs/stdout 2> .logs/stderr &
|
||||
wait_until_ready 1025
|
||||
|
||||
run_msmtp someone@testserver < content
|
||||
smtpc someone@testserver < content
|
||||
wait_for_file .mail/someone@testserver
|
||||
mail_diff content .mail/someone@testserver
|
||||
|
||||
|
||||
4
test/t-17-maillog/smtpc.conf
Normal file
4
test/t-17-maillog/smtpc.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
addr localhost:1465
|
||||
server_cert config/certs/testserver/fullchain.pem
|
||||
user user@testserver
|
||||
password secretpassword
|
||||
Reference in New Issue
Block a user