comparison scgi_merge_params.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 d4a0232425ee
children 196d33c2bb45
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
44 44
45 scgi_param SCGI 1; 45 scgi_param SCGI 1;
46 scgi_param HTTP_X_BLAH "blah"; 46 scgi_param HTTP_X_BLAH "blah";
47 47
48 server { 48 server {
49 listen 127.0.0.1:%%PORT_0%%; 49 listen 127.0.0.1:8080;
50 server_name localhost; 50 server_name localhost;
51 51
52 scgi_cache NAME; 52 scgi_cache NAME;
53 53
54 location / { 54 location / {
55 scgi_pass 127.0.0.1:%%PORT_1%%; 55 scgi_pass 127.0.0.1:8081;
56 } 56 }
57 57
58 location /no/ { 58 location /no/ {
59 scgi_pass 127.0.0.1:%%PORT_1%%; 59 scgi_pass 127.0.0.1:8081;
60 scgi_cache off; 60 scgi_cache off;
61 } 61 }
62 62
63 location /custom/ { 63 location /custom/ {
64 scgi_pass 127.0.0.1:%%PORT_1%%; 64 scgi_pass 127.0.0.1:8081;
65 scgi_param SCGI 1; 65 scgi_param SCGI 1;
66 scgi_param HTTP_X_BLAH "custom"; 66 scgi_param HTTP_X_BLAH "custom";
67 } 67 }
68 } 68 }
69 } 69 }
70 70
71 EOF 71 EOF
72 72
73 $t->run_daemon(\&scgi_daemon); 73 $t->run_daemon(\&scgi_daemon);
74 $t->run()->waitforsocket('127.0.0.1:' . port(1)); 74 $t->run()->waitforsocket('127.0.0.1:' . port(8081));
75 75
76 ############################################################################### 76 ###############################################################################
77 77
78 like(http_get_ims('/'), qr/ims=;/, 78 like(http_get_ims('/'), qr/ims=;/,
79 'if-modified-since cleared with cache'); 79 'if-modified-since cleared with cache');
113 ############################################################################### 113 ###############################################################################
114 114
115 sub scgi_daemon { 115 sub scgi_daemon {
116 my $server = IO::Socket::INET->new( 116 my $server = IO::Socket::INET->new(
117 Proto => 'tcp', 117 Proto => 'tcp',
118 LocalHost => '127.0.0.1:' . port(1), 118 LocalHost => '127.0.0.1:' . port(8081),
119 Listen => 5, 119 Listen => 5,
120 Reuse => 1 120 Reuse => 1
121 ) 121 )
122 or die "Can't create listening socket: $!\n"; 122 or die "Can't create listening socket: $!\n";
123 123