[nginx-tests] Tests: test for long commands with SMTP pipelining.
Maxim Dounin
mdounin at mdounin.ru
Sat Mar 30 05:08:35 UTC 2024
details: http://freenginx.org/hg/nginx-tests/rev/92d90cc5f5e5
branches:
changeset: 1952:92d90cc5f5e5
user: Maxim Dounin <mdounin at mdounin.ru>
date: Sat Mar 30 07:18:55 2024 +0300
description:
Tests: test for long commands with SMTP pipelining.
diffstat:
mail_smtp.t | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diffs (41 lines):
diff --git a/mail_smtp.t b/mail_smtp.t
--- a/mail_smtp.t
+++ b/mail_smtp.t
@@ -98,7 +98,7 @@ http {
EOF
$t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
-$t->run()->plan(41);
+$t->run()->plan(43);
$t->waitforsocket('127.0.0.1:' . port(8026));
@@ -284,6 +284,28 @@ my $s = Test::Nginx::SMTP->new();
$s->ok('long pipelined rcpt to 4');
$s->ok('long pipelined rset');
+# Pipelining longer than smtp_client_buffer, with
+# extra pipelined commands to be processed by nginx itself
+
+$s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027));
+$s->read();
+$s->send('EHLO example.com');
+$s->read();
+
+$s->send('MAIL FROM:<test at example.com> FOO=' . ('X' x 90) . CRLF
+ . 'RCPT TO:<test at example.com>' . CRLF
+ . 'RSET');
+
+$s->read();
+
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.25.5');
+
+$s->ok('pipelined long rcpt to');
+$s->ok('pipelined long rset');
+
+}
+
# Connection must stay even if error returned to rcpt to command
$s = Test::Nginx::SMTP->new();
More information about the nginx-devel
mailing list