changeset 1952:92d90cc5f5e5

Tests: test for long commands with SMTP pipelining.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 30 Mar 2024 07:18:55 +0300
parents 1867428f1673
children 33b54de4ee23
files mail_smtp.t
diffstat 1 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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@example.com> FOO=' . ('X' x 90) . CRLF
+	. 'RCPT TO:<test@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();