Mercurial > hg > nginx-tests
comparison mail_smtp.t @ 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 | 2a0a6035a1af |
children |
comparison
equal
deleted
inserted
replaced
1951:1867428f1673 | 1952:92d90cc5f5e5 |
---|---|
96 } | 96 } |
97 | 97 |
98 EOF | 98 EOF |
99 | 99 |
100 $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon); | 100 $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon); |
101 $t->run()->plan(41); | 101 $t->run()->plan(43); |
102 | 102 |
103 $t->waitforsocket('127.0.0.1:' . port(8026)); | 103 $t->waitforsocket('127.0.0.1:' . port(8026)); |
104 | 104 |
105 ############################################################################### | 105 ############################################################################### |
106 | 106 |
282 $s->ok('long pipelined rcpt to 2'); | 282 $s->ok('long pipelined rcpt to 2'); |
283 $s->ok('long pipelined rcpt to 3'); | 283 $s->ok('long pipelined rcpt to 3'); |
284 $s->ok('long pipelined rcpt to 4'); | 284 $s->ok('long pipelined rcpt to 4'); |
285 $s->ok('long pipelined rset'); | 285 $s->ok('long pipelined rset'); |
286 | 286 |
287 # Pipelining longer than smtp_client_buffer, with | |
288 # extra pipelined commands to be processed by nginx itself | |
289 | |
290 $s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027)); | |
291 $s->read(); | |
292 $s->send('EHLO example.com'); | |
293 $s->read(); | |
294 | |
295 $s->send('MAIL FROM:<test@example.com> FOO=' . ('X' x 90) . CRLF | |
296 . 'RCPT TO:<test@example.com>' . CRLF | |
297 . 'RSET'); | |
298 | |
299 $s->read(); | |
300 | |
301 TODO: { | |
302 local $TODO = 'not yet' unless $t->has_version('1.25.5'); | |
303 | |
304 $s->ok('pipelined long rcpt to'); | |
305 $s->ok('pipelined long rset'); | |
306 | |
307 } | |
308 | |
287 # Connection must stay even if error returned to rcpt to command | 309 # Connection must stay even if error returned to rcpt to command |
288 | 310 |
289 $s = Test::Nginx::SMTP->new(); | 311 $s = Test::Nginx::SMTP->new(); |
290 $s->read(); | 312 $s->read(); |
291 $s->send('EHLO example.com'); | 313 $s->send('EHLO example.com'); |