comparison mail_smtp_greeting_delay.t @ 970:c227348453db

Tests: simplified parallel modifications in mail tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 08 Jul 2016 02:21:16 +0300
parents e9064d691790
children 6ea73d9f42e0
comparison
equal deleted inserted replaced
969:1edb092149e2 970:c227348453db
32 events { 32 events {
33 } 33 }
34 34
35 mail { 35 mail {
36 proxy_pass_error_message on; 36 proxy_pass_error_message on;
37 auth_http http://127.0.0.1:%%PORT_0%%/mail/auth; 37 auth_http http://127.0.0.1:8080/mail/auth;
38 xclient off; 38 xclient off;
39 39
40 server { 40 server {
41 listen 127.0.0.1:%%PORT_1%%; 41 listen 127.0.0.1:8025;
42 protocol smtp; 42 protocol smtp;
43 smtp_greeting_delay 1s; 43 smtp_greeting_delay 1s;
44 } 44 }
45 } 45 }
46 46
49 ############################################################################### 49 ###############################################################################
50 50
51 # With smtp_greeting_delay session expected to be closed after first error 51 # With smtp_greeting_delay session expected to be closed after first error
52 # message if client sent something before greeting. 52 # message if client sent something before greeting.
53 53
54 my $s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(1)); 54 my $s = Test::Nginx::SMTP->new();
55 $s->send('HELO example.com'); 55 $s->send('HELO example.com');
56 $s->check(qr/^5.. /, "command before greeting - session must be rejected"); 56 $s->check(qr/^5.. /, "command before greeting - session must be rejected");
57 ok($s->eof(), "session have to be closed"); 57 ok($s->eof(), "session have to be closed");
58 58
59 ############################################################################### 59 ###############################################################################