comparison mail_smtp.t @ 1681:ac26f7f2b187

Tests: test for split commands with SMTP pipelining.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 19 May 2021 04:33:03 +0300
parents 74986ebee2fd
children 57ff83315818
comparison
equal deleted inserted replaced
1680:e6bf510f5e13 1681:ac26f7f2b187
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(36); 101 $t->run()->plan(39);
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
246 246
247 $s->ok('pipelined mail from'); 247 $s->ok('pipelined mail from');
248 $s->ok('pipelined rcpt to'); 248 $s->ok('pipelined rcpt to');
249 $s->ok('pipelined rset'); 249 $s->ok('pipelined rset');
250 250
251 # Pipelining with split command
252
253 $s = Test::Nginx::SMTP->new();
254 $s->read();
255 $s->send('EHLO example.com');
256 $s->read();
257
258 $s->print('MAIL FROM:<test@example.com> SIZE=100' . CRLF
259 . 'RCPT TO:<test@example.com>' . CRLF
260 . 'RS');
261
262 $s->ok('split pipelined mail from');
263
264 TODO: {
265 local $TODO = 'not yet' unless $t->has_version('1.21.0');
266
267 $s->ok('split pipelined rcpt to');
268
269 }
270
271 $s->send('ET');
272 $s->ok('split pipelined rset');
273
251 # Pipelining longer than smtp_client_buffer 274 # Pipelining longer than smtp_client_buffer
252 275
253 $s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027)); 276 $s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027));
254 $s->read(); 277 $s->read();
255 $s->send('EHLO example.com'); 278 $s->send('EHLO example.com');