comparison image_filter.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 ed99be008b52
children 104701299b91
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
48 "" '-'; 48 "" '-';
49 default $arg_h; 49 default $arg_h;
50 } 50 }
51 51
52 server { 52 server {
53 listen 127.0.0.1:%%PORT_0%%; 53 listen 127.0.0.1:8080;
54 server_name localhost; 54 server_name localhost;
55 55
56 location /size { 56 location /size {
57 image_filter size; 57 image_filter size;
58 alias %%TESTDIR%%/; 58 alias %%TESTDIR%%/;
152 alias %%TESTDIR%%/; 152 alias %%TESTDIR%%/;
153 } 153 }
154 location /proxy_buffer { 154 location /proxy_buffer {
155 image_filter rotate 90; 155 image_filter rotate 90;
156 image_filter_buffer 20; 156 image_filter_buffer 20;
157 proxy_pass http://127.0.0.1:%%PORT_1%%/; 157 proxy_pass http://127.0.0.1:8081/;
158 proxy_buffering off; 158 proxy_buffering off;
159 proxy_buffer_size 512; 159 proxy_buffer_size 512;
160 } 160 }
161 } 161 }
162 } 162 }
175 $t->write_file('gif', $im->gif); 175 $t->write_file('gif', $im->gif);
176 $t->write_file('png', $im->png); 176 $t->write_file('png', $im->png);
177 $t->write_file('txt', 'SEE-THIS'); 177 $t->write_file('txt', 'SEE-THIS');
178 178
179 $t->run_daemon(\&http_daemon, $t); 179 $t->run_daemon(\&http_daemon, $t);
180 $t->run()->waitforsocket('127.0.0.1:' . port(1)); 180 $t->run()->waitforsocket('127.0.0.1:' . port(8081));
181 181
182 ############################################################################### 182 ###############################################################################
183 183
184 like(http_head('/test/gif'), qr/200 OK/, 'test'); 184 like(http_head('/test/gif'), qr/200 OK/, 'test');
185 like(http_head('/test/gif'), qr!Content-Type: image/gif!, 'test content-type'); 185 like(http_head('/test/gif'), qr!Content-Type: image/gif!, 'test content-type');
301 my ($t) = @_; 301 my ($t) = @_;
302 302
303 my $server = IO::Socket::INET->new( 303 my $server = IO::Socket::INET->new(
304 Proto => 'tcp', 304 Proto => 'tcp',
305 LocalHost => '127.0.0.1', 305 LocalHost => '127.0.0.1',
306 LocalPort => port(1), 306 LocalPort => port(8081),
307 Listen => 5, 307 Listen => 5,
308 Reuse => 1 308 Reuse => 1
309 ) 309 )
310 or die "Can't create listening socket: $!\n"; 310 or die "Can't create listening socket: $!\n";
311 311