Mercurial > hg > nginx-tests
comparison proxy_request_buffering_ssl.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 | fa48f8a195a3 |
children | 68a6678abae2 |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
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 http_ssl proxy rewrite/) | 27 my $t = Test::Nginx->new()->has(qw/http http_ssl proxy rewrite/) |
28 ->has_daemon('openssl'); | 28 ->has_daemon('openssl')->plan(18); |
29 | 29 |
30 $t->write_file_expand('nginx.conf', <<'EOF'); | 30 $t->write_file_expand('nginx.conf', <<'EOF'); |
31 | 31 |
32 %%TEST_GLOBALS%% | 32 %%TEST_GLOBALS%% |
33 | 33 |
111 . "-out '$d/$name.crt' -keyout '$d/$name.key' " | 111 . "-out '$d/$name.crt' -keyout '$d/$name.key' " |
112 . ">>$d/openssl.out 2>&1") == 0 | 112 . ">>$d/openssl.out 2>&1") == 0 |
113 or die "Can't create certificate for $name: $!\n"; | 113 or die "Can't create certificate for $name: $!\n"; |
114 } | 114 } |
115 | 115 |
116 $t->try_run('no proxy_request_buffering')->plan(18); | 116 $t->run(); |
117 | 117 |
118 ############################################################################### | 118 ############################################################################### |
119 | 119 |
120 unlike(http_get('/'), qr/X-Body:/ms, 'no body'); | 120 unlike(http_get('/'), qr/X-Body:/ms, 'no body'); |
121 | 121 |
151 ok($s, 'no preread'); | 151 ok($s, 'no preread'); |
152 | 152 |
153 SKIP: { | 153 SKIP: { |
154 skip 'no preread failed', 3 unless $s; | 154 skip 'no preread failed', 3 unless $s; |
155 | 155 |
156 TODO: { | |
157 local $TODO = 'not yet' unless $t->has_version('1.7.12'); | |
158 | |
159 is($s->{upload}('01234'), '01234', 'no preread - body part'); | 156 is($s->{upload}('01234'), '01234', 'no preread - body part'); |
160 is($s->{upload}('56789'), '56789', 'no preread - body part 2'); | 157 is($s->{upload}('56789'), '56789', 'no preread - body part 2'); |
161 | 158 |
162 } | |
163 | |
164 like($s->{http_end}(), qr/200 OK/, 'no preread - response'); | 159 like($s->{http_end}(), qr/200 OK/, 'no preread - response'); |
165 | 160 |
166 } | 161 } |
167 | 162 |
168 $s = get_body('/preread', 8082, 15, '01234'); | 163 $s = get_body('/preread', 8082, 15, '01234'); |
170 | 165 |
171 SKIP: { | 166 SKIP: { |
172 skip 'preread failed', 3 unless $s; | 167 skip 'preread failed', 3 unless $s; |
173 | 168 |
174 is($s->{preread}, '01234', 'preread - preread'); | 169 is($s->{preread}, '01234', 'preread - preread'); |
175 | |
176 TODO: { | |
177 local $TODO = 'not yet' unless $t->has_version('1.7.12'); | |
178 | |
179 is($s->{upload}('56789'), '56789', 'preread - body part'); | 170 is($s->{upload}('56789'), '56789', 'preread - body part'); |
180 is($s->{upload}('abcde'), 'abcde', 'preread - body part 2'); | 171 is($s->{upload}('abcde'), 'abcde', 'preread - body part 2'); |
181 | |
182 } | |
183 | 172 |
184 like($s->{http_end}(), qr/200 OK/, 'preread - response'); | 173 like($s->{http_end}(), qr/200 OK/, 'preread - response'); |
185 | 174 |
186 } | 175 } |
187 | 176 |