comparison debug_connection_syslog.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children a04323ab0622
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
34 } 34 }
35 35
36 http { 36 http {
37 %%TEST_GLOBALS_HTTP%% 37 %%TEST_GLOBALS_HTTP%%
38 38
39 error_log syslog:server=127.0.0.1:%%PORT_1_UDP%% alert; 39 error_log syslog:server=127.0.0.1:%%PORT_8081_UDP%% alert;
40 error_log syslog:server=127.0.0.1:%%PORT_2_UDP%% alert; 40 error_log syslog:server=127.0.0.1:%%PORT_8082_UDP%% alert;
41 41
42 server { 42 server {
43 listen 127.0.0.1:%%PORT_0%%; 43 listen 127.0.0.1:8080;
44 listen [::1]:%%PORT_0%%; 44 listen [::1]:%%PORT_8080%%;
45 server_name localhost; 45 server_name localhost;
46 46
47 location /debug { 47 location /debug {
48 proxy_pass http://[::1]:%%PORT_0%%/; 48 proxy_pass http://[::1]:%%PORT_8080%%/;
49 } 49 }
50 } 50 }
51 } 51 }
52 52
53 EOF 53 EOF
61 61
62 $t->plan(5); 62 $t->plan(5);
63 63
64 ############################################################################### 64 ###############################################################################
65 65
66 is(get_syslog('/', port(1)), '', 'no debug_connection syslog 1'); 66 is(get_syslog('/', port(8081)), '', 'no debug_connection syslog 1');
67 is(get_syslog('/', port(2)), '', 'no debug_connection syslog 2'); 67 is(get_syslog('/', port(8082)), '', 'no debug_connection syslog 2');
68 68
69 my @msgs = get_syslog('/debug', port(1), port(2)); 69 my @msgs = get_syslog('/debug', port(8081), port(8082));
70 like($msgs[0], qr/\[debug\]/, 'debug_connection syslog 1'); 70 like($msgs[0], qr/\[debug\]/, 'debug_connection syslog 1');
71 like($msgs[1], qr/\[debug\]/, 'debug_connection syslog 2'); 71 like($msgs[1], qr/\[debug\]/, 'debug_connection syslog 2');
72 is($msgs[0], $msgs[1], 'debug_connection syslog1 syslog2 match'); 72 is($msgs[0], $msgs[1], 'debug_connection syslog1 syslog2 match');
73 73
74 ############################################################################### 74 ###############################################################################