Mercurial > hg > nginx-tests
comparison proxy_request_buffering_chunked.t @ 568:907e89fba9c3
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sun, 03 May 2015 12:45:09 +0300 |
parents | dbf8fb0f3d30 |
children | 68a6678abae2 |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
22 ############################################################################### | 22 ############################################################################### |
23 | 23 |
24 select STDERR; $| = 1; | 24 select STDERR; $| = 1; |
25 select STDOUT; $| = 1; | 25 select STDOUT; $| = 1; |
26 | 26 |
27 my $t = Test::Nginx->new()->has(qw/http proxy rewrite/); | 27 my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(22); |
28 | 28 |
29 $t->write_file_expand('nginx.conf', <<'EOF'); | 29 $t->write_file_expand('nginx.conf', <<'EOF'); |
30 | 30 |
31 %%TEST_GLOBALS%% | 31 %%TEST_GLOBALS%% |
32 | 32 |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 EOF | 90 EOF |
91 | 91 |
92 $t->try_run('no proxy_request_buffering')->plan(22); | 92 $t->run(); |
93 | 93 |
94 ############################################################################### | 94 ############################################################################### |
95 | 95 |
96 unlike(http_get('/'), qr/X-Body:/ms, 'no body'); | 96 unlike(http_get('/'), qr/X-Body:/ms, 'no body'); |
97 | 97 |
148 ok($s, 'preread'); | 148 ok($s, 'preread'); |
149 | 149 |
150 SKIP: { | 150 SKIP: { |
151 skip 'preread failed', 3 unless $s; | 151 skip 'preread failed', 3 unless $s; |
152 | 152 |
153 TODO: { | |
154 local $TODO = 'not yet' unless $t->has_version('1.7.12'); | |
155 | |
156 is($s->{preread}, '5' . CRLF . '01234' . CRLF, 'preread - preread'); | 153 is($s->{preread}, '5' . CRLF . '01234' . CRLF, 'preread - preread'); |
157 | |
158 } | |
159 | |
160 is($s->{upload}('56789', last => 1), | 154 is($s->{upload}('56789', last => 1), |
161 '5' . CRLF . '56789' . CRLF . '0' . CRLF . CRLF, 'preread - body'); | 155 '5' . CRLF . '56789' . CRLF . '0' . CRLF . CRLF, 'preread - body'); |
162 | 156 |
163 like($s->{http_end}(), qr/200 OK/, 'preread - response'); | 157 like($s->{http_end}(), qr/200 OK/, 'preread - response'); |
164 | 158 |
168 ok($s, 'chunks'); | 162 ok($s, 'chunks'); |
169 | 163 |
170 SKIP: { | 164 SKIP: { |
171 skip 'chunks failed', 3 unless $s; | 165 skip 'chunks failed', 3 unless $s; |
172 | 166 |
173 TODO: { | |
174 local $TODO = 'not yet' unless $t->has_version('1.7.12'); | |
175 | |
176 is($s->{preread}, '9' . CRLF . '01234many' . CRLF, 'chunks - preread'); | 167 is($s->{preread}, '9' . CRLF . '01234many' . CRLF, 'chunks - preread'); |
177 | |
178 } | |
179 | |
180 is($s->{upload}('56789', many => 1, last => 1), | 168 is($s->{upload}('56789', many => 1, last => 1), |
181 '9' . CRLF . '56789many' . CRLF . '0' . CRLF . CRLF, 'chunks - body'); | 169 '9' . CRLF . '56789many' . CRLF . '0' . CRLF . CRLF, 'chunks - body'); |
182 | 170 |
183 like($s->{http_end}(), qr/200 OK/, 'chunks - response'); | 171 like($s->{http_end}(), qr/200 OK/, 'chunks - response'); |
184 | 172 |